mirror of
https://github.com/jazzband/django-auditlog.git
synced 2026-05-28 00:24:09 +00:00
more_improvements
This commit is contained in:
parent
9ebdb63976
commit
f34d333a57
1 changed files with 5 additions and 3 deletions
|
|
@ -206,11 +206,13 @@ def model_instance_diff(
|
|||
|
||||
if old_value != new_value:
|
||||
if field.name in custom_fields_callbacks:
|
||||
new_value = custom_fields_callbacks[field.name](
|
||||
deepdiff_result = custom_fields_callbacks[field.name](
|
||||
json.dumps(old_value), json.dumps(new_value)
|
||||
)
|
||||
old_value = " FIELD TOO LARGE "
|
||||
diff[field.name] = (smart_str(old_value), smart_str(new_value))
|
||||
diff[field.name] = (
|
||||
"[CUSTOM FIELD] Showing only the differences ->",
|
||||
deepdiff_result,
|
||||
)
|
||||
elif model_fields and field.name in model_fields["mask_fields"]:
|
||||
diff[field.name] = (
|
||||
mask_str(smart_str(old_value)),
|
||||
|
|
|
|||
Loading…
Reference in a new issue