summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorJannis Leidel <jannis@leidel.info>2012-02-04 16:05:39 +0000
committerJannis Leidel <jannis@leidel.info>2012-02-04 16:05:39 +0000
commit4d8a0f8902dd55348fbaf897048bef1cba285f05 (patch)
tree5251beb4032a65e4a0054d60671353ae3d0d354a /django
parent52d72a5a3e62ed8fde5796e0e131a8f7a5aefac3 (diff)
Fixed #17594 -- Stopped ModelFormset.save from running a SELECT query by relying on the fact that the initial form is already set. Thanks, tswicegood.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17434 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
-rw-r--r--django/forms/models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/forms/models.py b/django/forms/models.py
index 15d50419d4..cd8f027070 100644
--- a/django/forms/models.py
+++ b/django/forms/models.py
@@ -591,7 +591,7 @@ class BaseModelFormSet(BaseFormSet):
def save_existing_objects(self, commit=True):
self.changed_objects = []
self.deleted_objects = []
- if not self.get_queryset():
+ if not self.initial_forms:
return []
saved_instances = []