[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2024-02-22 03:33:40 +00:00
parent e46738b75c
commit e3d4c01b36
2 changed files with 5 additions and 3 deletions

View file

@ -1,7 +1,7 @@
from django.core.serializers.json import DjangoJSONEncoder
from decimal import Decimal
from django.core.serializers.json import DjangoJSONEncoder
AUDITLOG_BUGGY_REPR_DATATYPES = (Decimal,)

View file

@ -351,7 +351,9 @@ class LogEntry(models.Model):
choices=Action.choices, verbose_name=_("action"), db_index=True
)
changes_text = models.TextField(blank=True, verbose_name=_("change message"))
changes = models.JSONField(null=True, verbose_name=_("change message"), encoder=AuditLogChangesJSONEncoder)
changes = models.JSONField(
null=True, verbose_name=_("change message"), encoder=AuditLogChangesJSONEncoder
)
actor = models.ForeignKey(
to=settings.AUTH_USER_MODEL,
on_delete=models.SET_NULL,