diff options
Diffstat (limited to 'factory/base.py')
-rw-r--r-- | factory/base.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/factory/base.py b/factory/base.py index 61bf07e..f33657f 100644 --- a/factory/base.py +++ b/factory/base.py @@ -264,6 +264,6 @@ class DjangoModelFactory(Factory): @classmethod def _setup_next_sequence(cls): try: - return cls._associated_class.objects.values_list('id').order_by('-id')[0] + 1 + return cls._associated_class.objects.values_list('id').order_by('-id')[0][0] + 1 except IndexError: return 1 |