[charts] Fix lookup of latest chart
This commit is contained in:
@ -322,7 +322,9 @@ def build_charts_since(user, media_types: Optional[list] = None) -> None:
|
|||||||
Scrobble = apps.get_model("scrobbles", "Scrobble")
|
Scrobble = apps.get_model("scrobbles", "Scrobble")
|
||||||
|
|
||||||
latest_daily = (
|
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")
|
.order_by("-year", "-month", "-day")
|
||||||
.first()
|
.first()
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user