#28589: When saving in admin, readonly fields are saved again
-------------------------------------+-------------------------------------
Reporter: FingalP | Owner: nobody
Type: Bug | Status: new
Component: | Version: master
contrib.admin |
Severity: Normal | Keywords: Admin SQL Overwrite
Triage Stage: | Has patch: 1
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
-------------------------------------+-------------------------------------
On the admin page for a model, if a field is in readonly_fields, then
saving that model from the admin will create an SQL query that sets the
readonly field to it's value at the time the save button was clicked. This
field might have been changed (e.g. by a command or some other process)
during the time that the model is being saved, and with current behaviour
it would then be overwritten to it's old value.
Correct behaviour would be to not set the readonly field at all in the SQL
query.
--
Ticket URL: <https://code.djangoproject.com/ticket/28589>
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/050.b83c42699eec1cab45c7f962ea3ce566%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.