#18906: BaseModelFormSet.validate_unique should ignore forms marked for deletion -----------------------------+-------------------- Reporter: c.pollock@… | Owner: nobody Type: Bug | Status: new Component: Forms | Version: 1.4 Severity: Normal | Keywords: Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 0 | UI/UX: 0 -----------------------------+-------------------- is_valid() returns false for a formset where uniquness is violated even if one of the forms where the violation occurs has DELETE set to true in cleaned data
so maybe line 521 in django/forms/models.py which is currently if not hasattr(form, "cleaned_data"): continue should read something like, so it will ignore forms that are getting deleted anyway if not hasattr(form, "cleaned_data") or form.cleaned_data.get('DELETE', True): continue unless of course I have completely missed the point Cheers Charlie -- Ticket URL: <https://code.djangoproject.com/ticket/18906> 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 django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.