Opened 8 years ago
Last modified 8 years ago
#29332 closed Bug
AdminReadOnly field accepts the optional argument model_admin but treats it as non-optional — at Initial Version
| 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
Using a FieldSet without providing a model_admin results in an error since AdminReadOnly 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.
Note:
See TracTickets
for help on using tickets.