mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-06-02 02:28:32 +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:
|
for entry in log_entries:
|
||||||
try:
|
try:
|
||||||
changes_dict = json.loads(entry.changes)
|
changes_dict = json.loads(entry.changes)
|
||||||
logger.info(changes_dict)
|
|
||||||
# changes_dict will look like {'status': ['withdrawn', 'submitted']},
|
# changes_dict will look like {'status': ['withdrawn', 'submitted']},
|
||||||
# henceforth the len(changes_dict.get('status', [])) == 2
|
# henceforth the len(changes_dict.get('status', [])) == 2
|
||||||
if len(changes_dict.get("status", [])) == 2 and changes_dict.get("status", [])[1] == status:
|
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
|
return True
|
||||||
except JSONDecodeError:
|
except JSONDecodeError:
|
||||||
pass
|
logger.warning(
|
||||||
|
"JSON decode error while parsing logs for domain requests in has_previously_had_a_status_of"
|
||||||
|
)
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue