From d5d032542081568764367765f9f24f90f0d26e97 Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Sat, 25 Nov 2023 00:31:44 +0100 Subject: [PATCH] And again --- vrobbler/apps/locations/models.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/vrobbler/apps/locations/models.py b/vrobbler/apps/locations/models.py index 668d605..57efa85 100644 --- a/vrobbler/apps/locations/models.py +++ b/vrobbler/apps/locations/models.py @@ -53,16 +53,16 @@ class GeoLocation(ScrobblableMixin): int_lon, r_lon = str(data_dict.get("lat", "")).split(".") try: - trunc_len = r_lat[0:4] + trunc_lat = r_lat[0:4] except IndexError: - trunc_len = r_lat + trunc_lat = r_lat try: trunc_lon = r_lon[0:4] except IndexError: trunc_lon = r_lon - data_dict["lat"] = float(f"{{int_lat}}.{{trunc_lat}}") - data_dict["lon"] = float(f"{{int_lon}}.{{trunc_lon}}") + data_dict["lat"] = float(f"{int_lat}.{trunc_lat}") + data_dict["lon"] = float(f"{int_lon}.{trunc_lon}") int_alt, r_alt = str(data_dict.get("alt", "")).split(".") try: @@ -70,7 +70,7 @@ class GeoLocation(ScrobblableMixin): except IndexError: trunc_alt = r_alt - data_dict["altitude"] = float(f"{{int_alt}}.{{trunc_alt}}") + data_dict["altitude"] = float(f"{int_alt}.{trunc_alt}") location = cls.objects.filter( lat=data_dict.get("lat"),