Skip to content

Commit

Permalink
fix: fixed state of MAP_URL when MAP is not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
yurnov committed Jun 15, 2024
1 parent 9ffa3c6 commit 5c492d0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bot/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@
logger.warning("MAP_URL is not defined in .env file, using a default URL http://alerts.net.ua/alerts_map.png")
MAP_URL = "http://alerts.net.ua/alerts_map.png"
else:
MAP_URL = MAP_URL.strip('"')
if MAP_URL:
MAP_URL = MAP_URL.strip('"')
# ensure that MAP_URL is a valid URL with image (based on Content-Type)
try:
resp = requests.head(MAP_URL, timeout=15)
Expand Down

0 comments on commit 5c492d0

Please sign in to comment.