mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	analytics: Restrict fill_to_time to hour boundaries in process_count_stat.
This commit is contained in:
		@@ -87,6 +87,11 @@ def process_count_stat(stat, fill_to_time):
 | 
			
		||||
    else:
 | 
			
		||||
        raise AssertionError("Unknown frequency: %s" % (stat.frequency,))
 | 
			
		||||
 | 
			
		||||
    if floor_to_hour(fill_to_time) != fill_to_time:
 | 
			
		||||
        raise ValueError("fill_to_time must be on an hour boundary: %s" % (fill_to_time,))
 | 
			
		||||
    if fill_to_time.tzinfo is None:
 | 
			
		||||
        raise ValueError("fill_to_time must be timezone aware: %s" % (fill_to_time,))
 | 
			
		||||
 | 
			
		||||
    fill_state = FillState.objects.filter(property=stat.property).first()
 | 
			
		||||
    if fill_state is None:
 | 
			
		||||
        currently_filled = installation_epoch()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user