Browse Source

That's why we should have tests

Colin Powell 1 năm trước cách đây
mục cha
commit
1bc5cf31e0
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      vrobbler/apps/locations/models.py

+ 2 - 2
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]