[locations] Fix misisng return value

This commit is contained in:
2024-03-12 12:25:48 -04:00
parent 3af2ad203c
commit 11e6161502
2 changed files with 6 additions and 3 deletions

View File

@ -151,3 +151,4 @@ class GeoLocation(ScrobblableMixin):
"is_title_null": is_title_null,
},
)
return close_locations

View File

@ -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