The worst in this situation is that we have 2012 3Q in the yard but the 
issue still open :(

Четвер, 12 серпня 2010 р. 10:32:32 UTC+3 користувач Tomi Pieviläinen 
написав:
>
> I first approached the users-list to find out if I was simply doing 
> something wrong, but seems like there's no (obvious) mistake. 
>
> In a formset with can_delete, fs.is_valid() passes even if some of the 
> deleted forms are invalid. However fs.cleaned_data tries to access 
> every form, including the deleted forms, and causes an exception when 
> every form does not have cleaned_data. 
>
> Since fixing http://code.djangoproject.com/ticket/11801 the 
> deleted_forms is available even for invalid forms, but this does not 
> seem to help in anyway. Trying to remove the deleted forms from 
> fs.forms causes an array index out of bounds when iterating over 
> fs.cleaned_data. So it seems like there's no reasonable way to handle 
> the validated data in a formset if there is an invalid deleted form. 
> This is really surprising after is_valid has already passed. 
>
> This problem is encountered when a user starts modifying a form but 
> decides that the whole set of data should be deleted anyway. Requiring 
> that the form should be fixed before deletion is possible seems like 
> an unreasonable request, after all the data will be just deleted after 
> it validates (this is the current case in admin). 
>
> I'm not sure if this is an intended consequence (a documentation bug), 
> if this case should be added to an existing ticket (http:// 
> code.djangoproject.com/ticket/10828), an older ticket reopened (such 
> as http://code.djangoproject.com/ticket/9587) or a new ticket should 
> be made.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-developers/-/W_ufC7bVZI8J.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to