Skip to content

Commit

Permalink
Remove option for hourly flow engagement histogram
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanseymour committed Nov 22, 2024
1 parent 6247954 commit bca2b87
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions temba/flows/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit bca2b87

Please sign in to comment.