Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#29332 closed Bug (duplicate)

AdminReadonlyField accepts the optional argument model_admin but treats it as non-optional — at Version 2

Reported by: Josh Owned by: nobody
Component: contrib.admin Version: 1.11
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description (last modified by Tim Graham)

Using a FieldSet without providing a model_admin results in an error since AdminReadonlyField calls: model_admin.get_empty_value_display().

My expected behaviour is that it does not error, and sets the empty_value_display to the empty string.
Relevant file: https://github.com/django/django/blob/master/django/contrib/admin/helpers.py

Cheers.

Change History (2)

comment:1 by Tim Graham, 7 years ago

Resolution: duplicate
Status: newclosed
Summary: AdminReadOnly field accepts the optional argument model_admin but treats it as non-optionalAdminReadonlyField accepts the optional argument model_admin but treats it as non-optional

Duplicate of #27157.

comment:2 by Tim Graham, 7 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top