Ver Fonte

That's why we should have tests

Colin Powell há 1 ano atrás
pai
commit
1bc5cf31e0
1 ficheiros alterados com 2 adições e 2 exclusões
  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]