#22539: Model.full_clean() mutates exclude argument
----------------------------------------------+--------------------
Reporter: maggotfish@… | Owner: nobody
Type: Bug | Status: new
Component: Database layer (models, ORM) | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Easy pickings: 1 | UI/UX: 0
----------------------------------------------+--------------------
If model.full_clean() gets a list argument for `exclude`, and after
running clean_fields() errors are raised, it appends the names of those
fields to the `exclude` argument, mutating it and causing a really bad
side effect which is not expected by the user.
Instead, the list should be copied if it is not None.
--
Ticket URL: <https://code.djangoproject.com/ticket/22539>
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/063.74b4782d9b36985fc1c9bc275cfdd727%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.