Changes between Initial Version and Version 3 of Ticket #28589
- Timestamp:
- Sep 12, 2017, 5:59:11 AM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #28589
- Property Owner changed from to
- Property Status new → assigned
- Property Summary When saving in admin, readonly fields are saved again → When saving in admin, readonly fields are potentially overwritten
-
Ticket #28589 – Description
initial v3 1 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.1 On the admin page for a model, if a field is in readonly_fields or has editable=False, 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. 2 2 3 3 Correct behaviour would be to not set the readonly field at all in the SQL query.