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