summaryrefslogtreecommitdiff
path: root/factory/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'factory/base.py')
-rw-r--r--factory/base.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/factory/base.py b/factory/base.py
index 8de652d..3d3d383 100644
--- a/factory/base.py
+++ b/factory/base.py
@@ -661,6 +661,7 @@ class DjangoModelFactory(Factory):
except IndexError:
return 1
+ @classmethod
def _create(cls, target_class, *args, **kwargs):
"""Create an instance of the model, and save it to the database."""
return target_class._default_manager.create(*args, **kwargs)
@@ -670,6 +671,7 @@ class MogoFactory(Factory):
"""Factory for mogo objects."""
FACTORY_ABSTRACT = True
+ @classmethod
def _build(cls, target_class, *args, **kwargs):
return target_class.new(*args, **kwargs)