Преглед на файлове

[scrobbles] Fix timestamp log marker for locations

Colin Powell преди 11 месеца
родител
ревизия
0fa89af1d9
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 2 1
      vrobbler/apps/scrobbles/models.py

+ 2 - 1
vrobbler/apps/scrobbles/models.py

@@ -1043,8 +1043,9 @@ class Scrobble(TimeStampedModel):
 
         if existing_locations := location.in_proximity(named=True):
             existing_location = existing_locations.first()
+            ts = int(pendulum.now().timestamp())
             scrobble.log[
-                pendulum.now().timestamp
+                ts
             ] = f"Location {location.id} too close to this scrobble"
             scrobble.save(update_fields=["log"])
             logger.info(