In my application I have a formset with can_delete. Some custom validation is performed on submit, to determine whether the forms selected by the user for deletion can be deleted -- i.e. I have a custom clean() method on the form to decide whether deletion is permitted (based on various bits of dynamic state), which may raise a ValidationError to prevent it.
Up to rev 10206 (which relates to ticket #9587), this worked nicely, giving me exactly the user interface I want. But rev 10206 has changed things: the formset is_valid now returns True for deleted forms even if they have validation errors, on the grounds that (to quote) "formset with can_delete shouldn't require deleted forms to validate". This means that the formset is treated as valid by my view code, so it goes ahead and tries to save the formset, whereas what I want (and what happened prior to rev 10206) was that the form was re-displayed to the user with a nice error message. I understand the thinking behind #9587, but I wonder whether this consequence -- that it's no longer (straightforwardly) possible to use the validation mechanism to prevent deletion -- was intended. (There isn't much discussion in #9587 for me to tell.) If it was intended, any suggestions on how I can best alter my application to achieve what I want? Regards Dan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---