[widgets] Fix the date filter
This commit is contained in:
@ -84,11 +84,12 @@ def live_charts(
|
||||
chart_period: str = "all",
|
||||
limit: int = 15,
|
||||
app_label: str = "music",
|
||||
as_of: datetime = None,
|
||||
) -> QuerySet:
|
||||
now = timezone.now()
|
||||
now = as_of if as_of else timezone.now()
|
||||
tzinfo = now.tzinfo
|
||||
now = now.date()
|
||||
if user.is_authenticated:
|
||||
if user.is_authenticated and not as_of:
|
||||
now = now_user_timezone(user.profile)
|
||||
tzinfo = now.tzinfo
|
||||
|
||||
|
||||
Reference in New Issue
Block a user