mirror of
https://github.com/jazzband/django-auditlog.git
synced 2026-03-16 22:20:26 +00:00
Merge branches 'postgre-type-mismatch-fix' and 'postgre-type-mismatch-fix' of https://github.com/Tosinibikunle/django-auditlog into postgre-type-mismatch-fix
This commit is contained in:
commit
2c728d4ed6
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