diff --git a/auditlog/diff.py b/auditlog/diff.py index bd5fe59..c246c8a 100644 --- a/auditlog/diff.py +++ b/auditlog/diff.py @@ -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)),