Преглед изворни кода

[scrobbling] Fix missing location in create

Colin Powell пре 1 година
родитељ
комит
49dd148f9f
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      vrobbler/apps/scrobbles/models.py

+ 3 - 0
vrobbler/apps/scrobbles/models.py

@@ -890,6 +890,9 @@ class Scrobble(TimeStampedModel):
         that is far enough (and far enough over the last three past scrobbles) to have
         that is far enough (and far enough over the last three past scrobbles) to have
         actually moved.
         actually moved.
         """
         """
+        key = media_class_to_foreign_key(location.__class__.__name__)
+        scrobble_data[key + "_id"] = location.id
+
         scrobble = (
         scrobble = (
             cls.objects.filter(
             cls.objects.filter(
                 media_type=cls.MediaType.GEO_LOCATION,
                 media_type=cls.MediaType.GEO_LOCATION,