mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	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:
		@@ -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)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user