fix(core): dont save history for anonymous user

anonymous user is intended not to be granted access to any model

!13
This commit is contained in:
2024-05-29 04:09:35 +09:30
parent 6997232198
commit c656f5bce5

View File

@ -144,7 +144,7 @@ class SaveHistory(models.Model):
current_user = get_request().user
if before != after and after != '{}':
if before != after and after != '{}' and not current_user.is_anonymous:
entry = History.objects.create(
before = before_json,
after = after,