mirror of
https://github.com/jazzband/django-auditlog.git
synced 2026-05-05 06:04:44 +00:00
Provide fallback for when a field has no 'rel' attribute
This commit is contained in:
parent
882415ea18
commit
ccaf3925e4
1 changed files with 1 additions and 1 deletions
|
|
@ -22,7 +22,7 @@ def track_field(field):
|
|||
return False
|
||||
|
||||
# Do not track relations to LogEntry
|
||||
if getattr(field, 'rel') is not None and field.rel.to == LogEntry:
|
||||
if getattr(field, 'rel', None) is not None and field.rel.to == LogEntry:
|
||||
return False
|
||||
|
||||
return True
|
||||
|
|
|
|||
Loading…
Reference in a new issue