Skip to content

Commit

Permalink
[SDESK-4695] (fix): Histogram aggregations failing for relative dates (
Browse files Browse the repository at this point in the history
…#114)

These include the following range types:
* yesterday
* last week
* last month
* last year
  • Loading branch information
MarkLark86 authored Jan 20, 2020
1 parent 6ce24df commit d0f94dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/analytics/base_report/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def _get_histogram_aggregation(self, interval, args, aggregations):
# starting day of the week, based on app.config['START_OF_WEEK']
offset = 0 if interval != 'week' else get_weekstart_offset_hr()

if lt == 'now':
if lt.startswith('now'):
extended_bounds = {
'max': relative_to_absolute_datetime(lt, '%Y-%m-%dT%H:%M:%S'),
'min': relative_to_absolute_datetime(gte, '%Y-%m-%dT%H:%M:%S')
Expand Down

0 comments on commit d0f94dc

Please sign in to comment.