#26655: Provide a hook to handle database exceptions in Django Admin
-------------------------------+--------------------------------------
Reporter: nickretallack | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Comment (by charettes):
There's a small chance a race condition might occur between the validation
and save attempts but that's generalized to all usages of
`model_form.is_valid() and model_form.save()`.
I suppose we could wrap the save calls in a `transaction.atomic()` context
and make sure to rerun validation and set `form_validated=False` but I'm
not sure this is worth it as the probability and severity of the failure
is very low.
--
Ticket URL: <https://code.djangoproject.com/ticket/26655#comment:3>
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/071.d2fb7bc88131e786d428b5e4e087502b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.