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

Download all attachments as: .zip

Change History (7)

Changed 7 years ago by yedpodtrzitko

patch for correct readonly_fields save

comment:1 Changed 7 years ago by ramiro

  • milestone set to 1.2
  • Needs documentation unset
  • Needs tests set
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted
  • Version set to SVN

comment:2 Changed 7 years ago by jezdez

  • Patch needs improvement set

Changed 7 years ago by Alex

comment:3 Changed 7 years ago by Alex

  • Patch needs improvement unset

comment:4 Changed 7 years ago by jezdez

  • Resolution set to fixed
  • Status changed from new to closed

(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 deleted

Milestone 1.2 deleted

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