#15574: IndexError: list index out of range caused by inline formsets
--------------------------------+------------------------------------
     Reporter:  poswald         |                    Owner:  nobody
         Type:  Bug             |                   Status:  new
    Component:  Forms           |                  Version:  master
     Severity:  Normal          |               Resolution:
     Keywords:  inline formset  |             Triage Stage:  Accepted
    Has patch:  0               |      Needs documentation:  0
  Needs tests:  0               |  Patch needs improvement:  0
Easy pickings:  0               |                    UI/UX:  0
--------------------------------+------------------------------------

Comment (by Avraham Seror <tovmeod@…>):

 Tried:
 def change_view(self, request, object_id, form_url='',
 extra_context=None):
         try:
             return super(MyModelAdmin, self).change_view(request,
 object_id, form_url, extra_context)
         except IndexError:
             for key, value in request.POST.items():
                 if key.startswith('templatepage'):
                     request.POST.pop(key)
             return super(TemplateAdmin, self).change_view(request,
 object_id, form_url, extra_context)

 but is gives me ValidationError
 ManagementForm data is missing or has been tampered with

-- 
Ticket URL: <https://code.djangoproject.com/ticket/15574#comment:28>
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.dff72adf73c3865a6cfd230c03de53c2%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to