Use timedelta instead of checking days difference which did not work correctly
This commit is contained in:
		
							parent
							
								
									c2daf3a5a5
								
							
						
					
					
						commit
						78bea501a8
					
				@ -205,7 +205,7 @@ class Service(models.Model):
 | 
			
		||||
            avg_session_duration = None
 | 
			
		||||
 | 
			
		||||
        # Show hourly chart for date ranges of 3 days or less, otherwise daily chart
 | 
			
		||||
        if end_time.day <= start_time.day + 2:
 | 
			
		||||
        if (end_time - start_time).days <= 3:
 | 
			
		||||
            session_chart_tooltip_format = "MM/dd HH:mm"
 | 
			
		||||
            session_chart_data = {
 | 
			
		||||
                k["hour"]: k["count"]
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user