From 8157836b42931902f50842d0ef95c185fe067d47 Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Mon, 18 Nov 2024 14:19:41 -0500 Subject: [PATCH] [lastfm] Fix issue with no media obj --- vrobbler/apps/scrobbles/models.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vrobbler/apps/scrobbles/models.py b/vrobbler/apps/scrobbles/models.py index 8579ee2..a6bd364 100644 --- a/vrobbler/apps/scrobbles/models.py +++ b/vrobbler/apps/scrobbles/models.py @@ -147,7 +147,9 @@ class BaseFileImportMixin(TimeStampedModel): return for count, scrobble in enumerate(scrobbles): - scrobble_str = f"{scrobble.id}\t{scrobble.timestamp}\t{scrobble.media_obj.title}" + scrobble_str = ( + f"{scrobble.id}\t{scrobble.timestamp}\t{scrobble.media_obj}" + ) log_line = f"{scrobble_str}" if count > 0: log_line = "\n" + log_line