From 11e6161502ebf83b689011bccc3a98474344064a Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Tue, 12 Mar 2024 12:25:48 -0400 Subject: [PATCH] [locations] Fix misisng return value --- vrobbler/apps/locations/models.py | 1 + vrobbler/apps/scrobbles/models.py | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/vrobbler/apps/locations/models.py b/vrobbler/apps/locations/models.py index 6a5f493..4a9ddea 100644 --- a/vrobbler/apps/locations/models.py +++ b/vrobbler/apps/locations/models.py @@ -151,3 +151,4 @@ class GeoLocation(ScrobblableMixin): "is_title_null": is_title_null, }, ) + return close_locations diff --git a/vrobbler/apps/scrobbles/models.py b/vrobbler/apps/scrobbles/models.py index c6a4cb8..ab8b975 100644 --- a/vrobbler/apps/scrobbles/models.py +++ b/vrobbler/apps/scrobbles/models.py @@ -960,9 +960,10 @@ class Scrobble(TimeStampedModel): logger.info( f"[scrobbling] new location received, but not far from old location, not moving", extra={ - "new_location_id": location.id, + "scrobble_id": scrobble.id, + "media_id": location.id, "media_type": cls.MediaType.GEO_LOCATION, - "old_location_id": scrobble.media_obj.id, + "old_media__id": scrobble.media_obj.id, }, ) return scrobble @@ -974,6 +975,7 @@ class Scrobble(TimeStampedModel): "scrobble_id": scrobble.id, "media_type": cls.MediaType.GEO_LOCATION, "media_id": location.id, + "old_media_id": scrobble.media_obj.id, }, ) @@ -984,7 +986,7 @@ class Scrobble(TimeStampedModel): extra={ "media_id": location.id, "media_type": cls.MediaType.GEO_LOCATION, - "existing_location_id": existing_location.id, + "old_media_id": existing_location.id, }, ) scrobble_data["geo_location"] = existing_location