ソースを参照

[locations] Fix misisng return value

Colin Powell 1 年間 前
コミット
11e6161502
2 ファイル変更6 行追加3 行削除
  1. 1 0
      vrobbler/apps/locations/models.py
  2. 5 3
      vrobbler/apps/scrobbles/models.py

+ 1 - 0
vrobbler/apps/locations/models.py

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

+ 5 - 3
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