Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

newforms-admin: Fixed #4661 - formset forms can give false errors for…

… add_forms. Resetting the forms is still hackish, but this works for now.

git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@5589 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 48fc9e23425fab1ccf97b669050c1de359281ba2 1 parent 7c10d69
Joseph Kocherhans authored July 03, 2007

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  django/contrib/admin/options.py
4  django/contrib/admin/options.py
@@ -423,7 +423,7 @@ def add_view(self, request, form_url=''):
423 423
             for FormSet in self.get_inline_formsets():
424 424
                 inline_formset = FormSet(data=new_data)
425 425
                 inline_formsets.append(inline_formset)
426  
-            if form.is_valid() and all_valid(inline_formsets):
  426
+            if all_valid(inline_formsets) and form.is_valid():
427 427
                 return self.save_add(request, model, form, inline_formsets, '../%s/')
428 428
         else:
429 429
             form = ModelForm(initial=request.GET)
@@ -477,7 +477,7 @@ def change_view(self, request, object_id):
477 477
                 inline_formset = FormSet(obj, new_data)
478 478
                 inline_formsets.append(inline_formset)
479 479
 
480  
-            if form.is_valid() and all_valid(inline_formsets):
  480
+            if all_valid(inline_formsets) and form.is_valid():
481 481
                 return self.save_change(request, model, form, inline_formsets)
482 482
         else:
483 483
             form = ModelForm()

0 notes on commit 48fc9e2

Please sign in to comment.
Something went wrong with that request. Please try again.