Fix url path bug

This commit is contained in:
zandercymatics 2024-09-16 10:11:22 -06:00
parent b5b2d69344
commit eb3850458b
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
4 changed files with 55 additions and 6 deletions

View file

@ -598,9 +598,11 @@ class DomainRequest(TimeStampedModel):
def get_first_status_set_date(self, status):
"""Returns the date when the domain request was first set to the given status."""
log_entry = LogEntry.objects.filter(
content_type__model="domainrequest", object_pk=self.pk, changes__status__1=status
).order_by("-timestamp").first()
log_entry = (
LogEntry.objects.filter(content_type__model="domainrequest", object_pk=self.pk, changes__status__1=status)
.order_by("-timestamp")
.first()
)
return log_entry.timestamp.date() if log_entry else None
def get_first_status_started_date(self):