#36340: TypeError on readonly fields
-------------------------------------+-------------------------------------
Reporter: Rami | Owner: Rami Boutassghount
Boutassghount |
Type: Bug | Status: assigned
Component: | Version: 5.2
contrib.admin | Keywords: admin, contrib,
Severity: Normal | helpers
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
There is a small bug in the method `AdminReadonlyField.contents` of the
module `django.contrib.admin.helpers`. This method raises a `TypeError`
because the calling of the `display_for_field` has not been updated. It
has a new argument: `avoid_link`.
https://github.com/django/django/blob/main/django/contrib/admin/helpers.py#L296
```python
result_repr = display_for_field(value, f, self.empty_value_display)
```
--
Ticket URL: <
https://code.djangoproject.com/ticket/36340>
Django <
https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.