[FIX] Horilla Audit: History bug in candidate
This commit is contained in:
@@ -75,7 +75,7 @@ def get_diff(instance):
|
|||||||
new = change.new
|
new = change.new
|
||||||
field = instance._meta.get_field(change.field)
|
field = instance._meta.get_field(change.field)
|
||||||
is_fk = False
|
is_fk = False
|
||||||
if isinstance(field, models.fields.CharField) and field.choices:
|
if isinstance(field, models.fields.CharField) and field.choices and old and new:
|
||||||
choices = dict(field.choices)
|
choices = dict(field.choices)
|
||||||
old = choices[old]
|
old = choices[old]
|
||||||
new = choices[new]
|
new = choices[new]
|
||||||
|
|||||||
Reference in New Issue
Block a user