Move declarations to the right spot
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/vulnerability-scan Pipeline was successful

This commit is contained in:
Liam Steckler 2024-10-27 10:30:54 -07:00
parent 1aa5ea0975
commit 5075e73494

4
scl.py
View file

@ -421,6 +421,8 @@ with Session(engine) as session:
print("Existing record not found")
post_id = None
map_media_post_id = None
neighborhood = None
city = None
if not event_class["is_postable"]:
print(
"Outage is {} considered postable, will not post".format(
@ -438,13 +440,11 @@ with Session(engine) as session:
post_id = initial_post_result["post_id"]
map_media_post_id = initial_post_result["map_media_post_id"]
neighborhood = str()
try:
neighborhood = initial_post_result["neighborhood"]
except KeyError:
pass
city = str()
try:
city = initial_post_result["city"]
except KeyError: