mirror of
https://github.com/django/django.git
synced 2025-09-22 18:22:40 +00:00
Ensure bulk_create returns what it is supposed to.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16791 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
e95d0afe9e
commit
f2bc919ec0
2 changed files with 3 additions and 1 deletions
|
@ -388,6 +388,7 @@ class QuerySet(object):
|
|||
self.model._base_manager._insert(objs_with_pk, fields=fields, using=self.db)
|
||||
if objs_without_pk:
|
||||
self.model._base_manager._insert(objs_without_pk, fields=[f for f in fields if not isinstance(f, AutoField)], using=self.db)
|
||||
return objs
|
||||
|
||||
def get_or_create(self, **kwargs):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue