From 71b5af76156befc1c3850c1f92425e2c6093da47 Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Sun, 18 Feb 2024 01:25:23 -0500 Subject: [PATCH] [locations] Oops, don't want to update location scrobbles --- vrobbler/apps/scrobbles/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vrobbler/apps/scrobbles/models.py b/vrobbler/apps/scrobbles/models.py index 4eda4a8..59068c1 100644 --- a/vrobbler/apps/scrobbles/models.py +++ b/vrobbler/apps/scrobbles/models.py @@ -817,13 +817,13 @@ class Scrobble(TimeStampedModel): logger.info( f"[scrobbling] No existing location scrobbles, location {location.id} should be new scrobble" ) - return scrobble + return cls.create(scrobble_data) if scrobble.media_obj == location: logger.info( f"[scrobbling] updating {scrobble.id} - new location {location.id} and old location {scrobble.media_obj.id} are the same" ) - return scrobble.update(scrobble_data) + return scrobble if not location.has_moved( self.past_scrobbled_locations(POINTS_FOR_MOVEMENT_HISTORY) @@ -831,7 +831,7 @@ class Scrobble(TimeStampedModel): logger.info( f"[scrobbling] new location{location.id} and old location {scrobble.media_obj.id} are different, but close enough to not move" ) - return scrobble.update(scrobble_data) + return scrobble logger.info( f"[scrobbling] finishing {scrobble.id} so we can create new one for {location.id}",