1
0
mirror of https://github.com/django/django.git synced 2025-10-26 15:16:09 +00:00

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
This commit is contained in:
Jannis Leidel
2012-02-04 16:05:39 +00:00
parent 52d72a5a3e
commit 4d8a0f8902
2 changed files with 12 additions and 1 deletions

View File

@@ -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 = []