mirror of
https://github.com/jazzband/django-auditlog.git
synced 2026-05-05 06:04:44 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
1d61c9aa4c
commit
4fb1c11f68
1 changed files with 4 additions and 2 deletions
|
|
@ -138,9 +138,11 @@ class AuditlogHistoryAdminMixin:
|
|||
obj = self.get_object(request, unquote(object_id))
|
||||
if not self.has_view_permission(request, obj):
|
||||
raise PermissionDenied
|
||||
ct = ContentType.objects.get_for_model(obj.__class__)
|
||||
ct = ContentType.objects.get_for_model(obj.__class__)
|
||||
log_entries = (
|
||||
LogEntry.objects.filter(content_type=ct, object_pk=str(obj.pk)) # <--- Fixed here
|
||||
LogEntry.objects.filter(
|
||||
content_type=ct, object_pk=str(obj.pk)
|
||||
) # <--- Fixed here
|
||||
.select_related("actor")
|
||||
.order_by("-timestamp")
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue