[charts] Fix lookup of latest chart
All checks were successful
build & deploy / test (push) Successful in 1m41s
build & deploy / deploy (push) Successful in 30s

This commit is contained in:
2026-03-23 09:10:06 -04:00
parent 8ca73693d1
commit a874e9c712

View File

@ -322,7 +322,9 @@ def build_charts_since(user, media_types: Optional[list] = None) -> None:
Scrobble = apps.get_model("scrobbles", "Scrobble")
latest_daily = (
ChartRecord.objects.filter(user=user, day__isnull=False)
ChartRecord.objects.filter(
user=user, day__isnull=False, month__isnull=True
)
.order_by("-year", "-month", "-day")
.first()
)