#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 )
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 , 7 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Summary: | AdminReadOnly field accepts the optional argument model_admin but treats it as non-optional → AdminReadonlyField accepts the optional argument model_admin but treats it as non-optional |
comment:2 by , 7 years ago
Description: | modified (diff) |
---|
Note:
See TracTickets
for help on using tickets.
Duplicate of #27157.