#20522: Admin formset validation cannot take submitted model instance into 
account
when form not valid.
-------------------------------------+-------------------------------------
     Reporter:  meshy                |                    Owner:  kamni
         Type:  Bug                  |                   Status:  assigned
    Component:  contrib.admin        |                  Version:  master
     Severity:  Normal               |               Resolution:
     Keywords:  admin formset        |             Triage Stage:  Accepted
  validation                         |      Needs documentation:  0
    Has patch:  1                    |  Patch needs improvement:  1
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by anonymous):

 So one thing to consider: as you pointed out for the tests, the
 change_view tests already pass with the old code (i.e., the bug is only
 for the 'add' view -- see comment 4). I even considered the possibility
 that my tests were running validation against the old version of the model
 and that's why it was passing; but when I updated the tests so that the
 formset matched the expected data from the old version but the updated
 version would cause invalid fields (i.e., the tests should fail if the
 code wasn't reusing a model with failed validation), the tests still
 passed with the old options.py.

 This seems to imply that the change_view is already disregarding the
 "Don't re-use models that have failed validation". Clearly we have
 inconsistent behavior between two views that needs to be remedied in one
 way or another.

 So should we move forward with this ticket and make the add_view
 consistent with what change_view already seems to be doing, or should we
 open a new ticket to revert the change_view's behavior to be more
 consistent with
 [https://docs.djangoproject.com/en/1.6/topics/forms/modelforms
 /#validation-on-a-modelform Validation on a ModelForm]?

-- 
Ticket URL: <https://code.djangoproject.com/ticket/20522#comment:15>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.565f3168d865e7ba24ead47fb0db565a%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to