mirror of https://github.com/zulip/zulip.git
stream settings: Fix stream_age calculation in weekly traffic calculation.
This commit is contained in:
parent
3054b175c9
commit
dc7cfd3eb7
|
@ -3910,7 +3910,7 @@ def get_average_weekly_stream_traffic(stream_id: int, stream_date_created: datet
|
|||
except KeyError:
|
||||
return 0
|
||||
|
||||
stream_age = (timezone_now().date() - stream_date_created.date()).days
|
||||
stream_age = (timezone_now() - stream_date_created).days
|
||||
|
||||
if stream_age >= 28:
|
||||
average_weekly_traffic = int(stream_traffic // 4)
|
||||
|
|
Loading…
Reference in New Issue