[ADD] HELPDESK: New app for ticket configurations

This commit is contained in:
Horilla
2024-01-08 13:54:00 +05:30
parent ef6b5c4b36
commit c8c5d95839
59 changed files with 35766 additions and 27691 deletions

View File

@@ -75,6 +75,10 @@ def get_diff(instance):
new = change.new
field = instance._meta.get_field(change.field)
is_fk = False
if isinstance(field, models.fields.CharField) and field.choices:
choices = dict(field.choices)
old = choices[old]
new = choices[new]
if isinstance(field, models.ForeignKey):
is_fk = True
# old = getattr(pair[0], change.field)