Fix error getting process log lines
This commit is contained in:
@ -102,10 +102,11 @@ class BaseFileImportMixin(TimeStampedModel):
|
|||||||
|
|
||||||
def scrobbles(self) -> models.QuerySet:
|
def scrobbles(self) -> models.QuerySet:
|
||||||
scrobble_ids = []
|
scrobble_ids = []
|
||||||
for line in self.process_log.split("\n"):
|
if self.process_log:
|
||||||
sid = line.split("\t")[0]
|
for line in self.process_log.split("\n"):
|
||||||
if sid:
|
sid = line.split("\t")[0]
|
||||||
scrobble_ids.append(sid)
|
if sid:
|
||||||
|
scrobble_ids.append(sid)
|
||||||
return Scrobble.objects.filter(id__in=scrobble_ids)
|
return Scrobble.objects.filter(id__in=scrobble_ids)
|
||||||
|
|
||||||
def mark_started(self):
|
def mark_started(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user