cleaned up json endpoint with comment and formatting

This commit is contained in:
David Kennedy 2024-06-24 14:29:17 -04:00
parent 1b89031a54
commit 3f399db985
No known key found for this signature in database
GPG key ID: 6528A5386E66B96B

View file

@ -31,9 +31,11 @@ def get_domains_json(request):
if status_param:
status_list = status_param.split(",")
# if unknown is in status_list, append 'dns needed'
if 'unknown' in status_list:
status_list.append('dns needed')
# if unknown is in status_list, append 'dns needed' since both
# unknown and dns needed display as DNS Needed, and both are
# searchable via state parameter of 'unknown'
if "unknown" in status_list:
status_list.append("dns needed")
# Split the status list into normal states and custom states
normal_states = [state for state in status_list if state in Domain.State.values]