#13223: ValueError with inline and save as new
-------------------------------------+-------------------------------------
               Reporter:             |          Owner:  gptvnt
  lucalenardi                        |         Status:  assigned
                   Type:  Bug        |      Component:  contrib.admin
              Milestone:             |       Severity:  Normal
                Version:  1.1        |       Keywords:  admin, save-as-new
             Resolution:             |      Has patch:  1
           Triage Stage:  Accepted   |    Needs tests:  0
    Needs documentation:  0          |  Easy pickings:  0
Patch needs improvement:  0          |
-------------------------------------+-------------------------------------

Comment (by prestontimmons):

 Thanks, Kevin. I verified your new patch fixes the problem.

 I'm hesitant to mark it ready for check-in. The "save_as_new" property is
 really a part of BaseInlineFormSet. Adding a check for it in BaseFormSet
 seems wrong. It might be more appropriate to put this fix in a custom
 "_management_form" method on the BaseInlineFormSet instead.

 I'm also attaching a separate patch. Instead of modifying the formset
 classes it modifies the add_view method to post the value "_saveasnew" on
 subsequent requests, even when form errors appear. When the form is
 redisplayed the admin switches from the change_view to the add_view and
 loses this piece of information in the process.

 I'm not sure what the best solution is.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/13223#comment:12>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to