location_name will not be defined when querying a location instead of a user

This commit is contained in:
jesopo 2019-06-18 16:53:57 +01:00
parent b3b8c6534b
commit 00d7da9967

View file

@ -40,6 +40,7 @@ class Module(ModuleManager.BaseModule):
args = {"units": "metric", "APPID": api_key} args = {"units": "metric", "APPID": api_key}
location_name = None
if location: if location:
lat, lon, location_name = location lat, lon, location_name = location
args["lat"] = lat args["lat"] = lat