소스 검색

That's why we should have tests

Colin Powell 1 년 전
부모
커밋
1bc5cf31e0
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  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]