support unknown status

This commit is contained in:
Mateusz Konieczny 2022-09-14 12:10:46 +02:00
parent ac7a11a805
commit def260e584
3 changed files with 7 additions and 2 deletions

View File

@ -334,6 +334,10 @@
<Filter>[status] = "Withdrawn"</Filter>
<PolygonSymbolizer fill="#999999"/>
</Rule>
<Rule>
<Filter>[status] = "Unknown"</Filter>
<PolygonSymbolizer fill="#eacad0"/>
</Rule>
</Style>
<Style name="planning_combined">
<Rule>

View File

@ -178,6 +178,7 @@ export const categoryMapsConfig: {[key in Category]: CategoryMapDefinition[]} =
{ color: '#fff200', text: 'Appeal In Progress' },
{ color: '#e31d23', text: 'Refused' },
{ color: '#999999', text: 'Withdrawn' },
{ color: '#eacad0', text: 'Unknown' },
]
}
},

View File

@ -54,7 +54,7 @@ def main():
last_synced_date = parse_date_string_into_datestring(entry['_source']['last_synced'])
uprn = entry['_source']['uprn']
status = entry['_source']['status']
if status in ["No Objection to Proposal (OBS only)", "Not Required", None, "Lapsed", "Unknown", "SECS", "Comment Issued"]:
if status in ["No Objection to Proposal (OBS only)", "Not Required", None, "Lapsed", "SECS", "Comment Issued"]:
continue
if status in []:
opts = jsbeautifier.default_options()
@ -65,7 +65,7 @@ def main():
status = "Rejected"
if status == "Appeal Received":
status = "Appeal In Progress"
if (status not in ["Approved", "Rejected", "Appeal In Progress", "Withdrawn", ]):
if (status not in ["Approved", "Rejected", "Appeal In Progress", "Withdrawn", "Unknown"]):
raise Exception("Unexpected status " + status)
if uprn == None:
continue