Opened 7 years ago

Closed 7 years ago

Last modified 5 years ago

#12628 closed (fixed)

readonly_fields in GenericInlineModelAdmin are ignored during save

Reported by: Jiri Suchan Owned by: nobody
Component: contrib.admin Version: master
Severity: Keywords: readonly_fields, generic
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: yes Patch needs improvement: no
Easy pickings: UI/UX:


Fields defined in readonly_fields property in GenericStackedInline class are properly displayed as readonly elements. But during save is readonly_fields property ignored, so all values for those fields are saved with empty value.

Note to attached patch:
Fields in 'exclude' properly are handled properly, so I joined them together with readonly_fields.

Attachments (2)

generic_inlines_save.diff (685 bytes) - added by Jiri Suchan 7 years ago.
patch for correct readonly_fields save
generic-readonly.diff (1.0 KB) - added by Alex Gaynor 7 years ago.

Download all attachments as: .zip

Change History (7)

Changed 7 years ago by Jiri Suchan

Attachment: generic_inlines_save.diff added

patch for correct readonly_fields save

comment:1 Changed 7 years ago by Ramiro Morales

milestone: 1.2
Needs documentation: unset
Needs tests: set
Patch needs improvement: unset
Triage Stage: UnreviewedAccepted
Version: SVN

comment:2 Changed 7 years ago by Jannis Leidel

Patch needs improvement: set

Changed 7 years ago by Alex Gaynor

Attachment: generic-readonly.diff added

comment:3 Changed 7 years ago by Alex Gaynor

Patch needs improvement: unset

comment:4 Changed 7 years ago by Jannis Leidel

Resolution: fixed
Status: newclosed

(In [12367]) Fixed #12628 - Don't ignore read-only fields in GenericInlineModelAdmin during save. Thanks, Alex Gaynor.

comment:5 Changed 5 years ago by Jacob

milestone: 1.2

Milestone 1.2 deleted

Note: See TracTickets for help on using tickets.
Back to Top