summaryrefslogtreecommitdiff
path: root/factory
diff options
context:
space:
mode:
Diffstat (limited to 'factory')
-rw-r--r--factory/base.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/factory/base.py b/factory/base.py
index 890a7c9..f25fd5c 100644
--- a/factory/base.py
+++ b/factory/base.py
@@ -268,6 +268,6 @@ class DjangoModelFactory(Factory):
@classmethod
def _setup_next_sequence(cls):
try:
- return cls._associated_class.objects.values_list('id', flat=True).order_by('-id')[0] + 1
+ return cls._associated_class._default_manager.values_list('id', flat=True).order_by('-id')[0] + 1
except IndexError:
return 1