mirror of
https://github.com/jazzband/django-auditlog.git
synced 2026-05-03 21:24:43 +00:00
Simplify field.base_field.choices check
This commit is contained in:
parent
cb1fefb793
commit
0ca00faafc
1 changed files with 1 additions and 1 deletions
|
|
@ -257,7 +257,7 @@ class LogEntry(models.Model):
|
|||
choices_dict = None
|
||||
if getattr(field, 'choices', []):
|
||||
choices_dict = dict(field.choices)
|
||||
if hasattr(field, 'base_field') and getattr(field.base_field, 'choices', False):
|
||||
if getattr(getattr(field, 'base_field', None), 'choices', []):
|
||||
choices_dict = dict(field.base_field.choices)
|
||||
|
||||
if choices_dict:
|
||||
|
|
|
|||
Loading…
Reference in a new issue