fix auditlog errors

This commit is contained in:
matthewswspence 2025-01-14 12:15:59 -06:00
parent a0a53ea855
commit de07b109c2
No known key found for this signature in database
GPG key ID: FB458202A7852BA4

View file

@ -2782,8 +2782,10 @@ class DomainRequestAdmin(ListHeaderAdmin, ImportExportModelAdmin):
try:
# Retrieve and order audit log entries by timestamp in descending order
audit_log_entries = LogEntry.objects.filter(object_id=object_id).order_by("-timestamp")
audit_log_entries = LogEntry.objects.filter(
object_id=object_id, content_type__model="domainrequest"
).order_by("-timestamp")
# Process each log entry to filter based on the change criteria
for log_entry in audit_log_entries:
entry = self.process_log_entry(log_entry)