diff --git a/auditlog/diff.py b/auditlog/diff.py index 51cf5c3..bd5fe59 100644 --- a/auditlog/diff.py +++ b/auditlog/diff.py @@ -206,10 +206,10 @@ def model_instance_diff( if old_value != new_value: if field.name in custom_fields_callbacks: - old_value = " FIELD TOO LARGE " new_value = custom_fields_callbacks[field.name]( - old_value, new_value + json.dumps(old_value), json.dumps(new_value) ) + old_value = " FIELD TOO LARGE " diff[field.name] = (smart_str(old_value), smart_str(new_value)) elif model_fields and field.name in model_fields["mask_fields"]: diff[field.name] = ( diff --git a/setup.py b/setup.py index 901ab66..5927137 100644 --- a/setup.py +++ b/setup.py @@ -28,7 +28,11 @@ setup( long_description=long_description, long_description_content_type="text/markdown", python_requires=">=3.8", - install_requires=["Django>=3.2", "python-dateutil>=2.7.0"], + install_requires=[ + "Django>=3.2", + "python-dateutil>=2.7.0", + "deepdiff==7.0.*", + ], zip_safe=False, classifiers=[ "Programming Language :: Python :: 3",