[people] Fix if person_ids is None
All checks were successful
build & deploy / test (push) Successful in 1m56s
build & deploy / deploy (push) Successful in 21s

This commit is contained in:
2026-03-21 11:38:36 -04:00
parent 29cd2f8015
commit 29a677142c

View File

@ -33,8 +33,8 @@ class Person(TimeStampedModel):
count = 0
for scrobble in Scrobble.objects.filter(user=self.created_by):
if scrobble.log and isinstance(scrobble.log, dict):
person_ids = scrobble.log.get("with_people_ids", [])
if self.id in person_ids:
person_ids = scrobble.log.get("with_people_ids") or []
if person_ids and self.id in person_ids:
count += 1
self.scrobble_count = count
self.save(update_fields=["scrobble_count"])