From 29a677142c453937e69001093566850d80b5f1d9 Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Sat, 21 Mar 2026 11:38:36 -0400 Subject: [PATCH] [people] Fix if person_ids is None --- vrobbler/apps/people/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vrobbler/apps/people/models.py b/vrobbler/apps/people/models.py index 969a2d3..872b709 100644 --- a/vrobbler/apps/people/models.py +++ b/vrobbler/apps/people/models.py @@ -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"])