diff --git a/cc_dynamodb3/models.py b/cc_dynamodb3/models.py index fc519bd..cfc8182 100644 --- a/cc_dynamodb3/models.py +++ b/cc_dynamodb3/models.py @@ -179,9 +179,13 @@ def query(cls, query_index=None, descending=False, limit=None, filter_expression yield cls.from_row(row, metadata) @classmethod - def create(cls, **kwargs): + def build(cls, **kwargs): dynamodb_data = cls._initial_data_to_dynamodb(kwargs) - model = cls(dynamodb_data) + return cls(dynamodb_data) + + @classmethod + def create(cls, **kwargs): + model = cls.build(**kwargs) model.save(overwrite=True) return model