diff options
| author | Alex Gaynor <alex.gaynor@gmail.com> | 2011-09-10 21:46:59 +0000 |
|---|---|---|
| committer | Alex Gaynor <alex.gaynor@gmail.com> | 2011-09-10 21:46:59 +0000 |
| commit | b45a4acf6f29025f28baf524809f34a14b7ccde7 (patch) | |
| tree | a2882f1221e2251bcda18efa5a055e8ad73f0ed7 /django | |
| parent | f2bc919ec00457fd53f093af53ab71c7f1bcfbcd (diff) | |
Ensure bulk_create returns the right value if the argument is an empty list.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16792 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
| -rw-r--r-- | django/db/models/query.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/models/query.py b/django/db/models/query.py index dbd37b1822..0e1a1b31b4 100644 --- a/django/db/models/query.py +++ b/django/db/models/query.py @@ -372,7 +372,7 @@ class QuerySet(object): if self.model._meta.parents: raise ValueError("Can't bulk create an inherited model") if not objs: - return + return objs self._for_write = True connection = connections[self.db] fields = self.model._meta.local_fields |
