michellethomas commented on a change in pull request #6269: Fixing time range
since with no "ago"
URL:
https://github.com/apache/incubator-superset/pull/6269#discussion_r230531221
##########
File path: superset/views/core.py
##########
@@ -1036,12 +1036,13 @@ def get_form_data(self, slice_id=None,
use_slice_data=False):
# special treat for since/until and time_range parameter:
# we need to breakdown time_range into since/until so request
parameters
# has precedence over slice parameters for time fields.
- if 'time_range' in form_data:
- form_data['since'], separator, form_data['until'] = \
- form_data['time_range'].partition(' : ')
- if 'time_range' in slice_form_data:
- slice_form_data['since'], separator, slice_form_data['until']
= \
- slice_form_data['time_range'].partition(' : ')
+ if 'since' in form_data:
Review comment:
slice_form_data has already ran update_time_range, so it shouldn't have
since/until, but in the situation where since is in the form_data we need to
merge since/until/time range for form_data and slice_form_data
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]