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:
Rishi Gupta 2018-06-20 12:13:14 -07:00 committed by Tim Abbott
parent f63bcb99d7
commit 5eccabc3c5
1 changed files with 1 additions and 1 deletions

View File

@ -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)