mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-31 09:43:54 +02:00
clean up
This commit is contained in:
parent
e2c965a915
commit
e04a8bde61
1 changed files with 3 additions and 3 deletions
|
@ -576,14 +576,14 @@ class DomainApplication(TimeStampedModel):
|
|||
for entry in log_entries:
|
||||
try:
|
||||
changes_dict = json.loads(entry.changes)
|
||||
logger.info(changes_dict)
|
||||
# changes_dict will look like {'status': ['withdrawn', 'submitted']},
|
||||
# henceforth the len(changes_dict.get('status', [])) == 2
|
||||
if len(changes_dict.get("status", [])) == 2 and changes_dict.get("status", [])[1] == status:
|
||||
logger.info(f"found one instance where it had a status of {status}")
|
||||
return True
|
||||
except JSONDecodeError:
|
||||
pass
|
||||
logger.warning(
|
||||
"JSON decode error while parsing logs for domain requests in has_previously_had_a_status_of"
|
||||
)
|
||||
|
||||
return False
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue