Changes between Initial Version and Version 3 of Ticket #28589


Ignore:
Timestamp:
Sep 12, 2017, 5:59:11 AM (7 years ago)
Author:
Fingal Plumpton
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28589

    • Property Owner changed from nobody to Fingal Plumpton
    • Property Status newassigned
    • Property Summary When saving in admin, readonly fields are saved againWhen 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.
     1On 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.
    22
    33Correct behaviour would be to not set the readonly field at all in the SQL query.
Back to Top