mirror of https://github.com/zulip/zulip.git
stream settings: Set average_weekly_traffic to -1 if stream is new.
We don't ever use this value, but it's confusing to have the incorrect calculation in the code. Ideally we would set this to "None", but I don't know the code well enough to be confident nothing would break.
This commit is contained in:
parent
f63bcb99d7
commit
5eccabc3c5
|
@ -3917,7 +3917,7 @@ def get_average_weekly_stream_traffic(stream_id: int, stream_date_created: datet
|
|||
elif stream_age >= STREAM_TRAFFIC_CALCULATION_MIN_AGE_DAYS:
|
||||
average_weekly_traffic = int(stream_traffic * 7 // stream_age)
|
||||
else:
|
||||
average_weekly_traffic = stream_traffic
|
||||
average_weekly_traffic = -1
|
||||
|
||||
return round_to_2_significant_digits(average_weekly_traffic)
|
||||
|
||||
|
|
Loading…
Reference in New Issue