From bca2b87bb47a800c9b783dba62f2a7a867aaf2e9 Mon Sep 17 00:00:00 2001 From: Rowan Seymour Date: Fri, 22 Nov 2024 19:00:53 +0000 Subject: [PATCH] Remove option for hourly flow engagement histogram --- temba/flows/views.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/temba/flows/views.py b/temba/flows/views.py index 2a33107964e..c227c442e44 100644 --- a/temba/flows/views.py +++ b/temba/flows/views.py @@ -1224,10 +1224,8 @@ def render_to_response(self, context, **response_kwargs): # our main histogram date_range = end_date - start_date histogram = self.object.path_counts.filter(from_uuid__in=exit_uuids) - if date_range < timedelta(days=21): - histogram = histogram.extra({"bucket": "date_trunc('hour', period)"}) - min_date = start_date - timedelta(hours=1) - elif date_range < timedelta(days=500): + + if date_range < timedelta(days=500): histogram = histogram.extra({"bucket": "date_trunc('day', period)"}) min_date = end_date - timedelta(days=100) else: