From 1bc5cf31e09fc1e538a606e90d6ff957f6af897f Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Sat, 25 Nov 2023 00:27:12 +0100 Subject: [PATCH] That's why we should have tests --- vrobbler/apps/locations/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vrobbler/apps/locations/models.py b/vrobbler/apps/locations/models.py index cc4bf80..668d605 100644 --- a/vrobbler/apps/locations/models.py +++ b/vrobbler/apps/locations/models.py @@ -49,8 +49,8 @@ class GeoLocation(ScrobblableMixin): logger.error("No lat or lon keys in data dict") return - int_lat, r_lat = str(data_dict["lat", ""]).split(".") - int_lon, r_lon = str(data_dict["lat", ""]).split(".") + int_lat, r_lat = str(data_dict.get("lat", "")).split(".") + int_lon, r_lon = str(data_dict.get("lat", "")).split(".") try: trunc_len = r_lat[0:4]