Merge pull request #3343 from cisagov/ms/3171-fix-auditlog-errors

#3171: fix auditlog errors
This commit is contained in:
Matt-Spence 2025-01-14 15:48:12 -05:00 committed by GitHub
commit 274ca8b5c3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2782,7 +2782,9 @@ 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: