Opened 15 years ago

Closed 15 years ago

Last modified 13 years ago

#12628 closed (fixed)

readonly_fields in GenericInlineModelAdmin are ignored during save

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

Description

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 15 years ago.
patch for correct readonly_fields save
generic-readonly.diff (1.0 KB ) - added by Alex Gaynor 15 years ago.

Download all attachments as: .zip

Change History (7)

by Jiri Suchan, 15 years ago

Attachment: generic_inlines_save.diff added

patch for correct readonly_fields save

comment:1 by Ramiro Morales, 15 years ago

milestone: 1.2
Needs tests: set
Triage Stage: UnreviewedAccepted
Version: SVN

comment:2 by Jannis Leidel, 15 years ago

Patch needs improvement: set

by Alex Gaynor, 15 years ago

Attachment: generic-readonly.diff added

comment:3 by Alex Gaynor, 15 years ago

Patch needs improvement: unset

comment:4 by Jannis Leidel, 15 years ago

Resolution: fixed
Status: newclosed

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

comment:5 by Jacob, 13 years ago

milestone: 1.2

Milestone 1.2 deleted

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