mistercrunch commented on a change in pull request #6220: [SIP-5] Open a new
/api/v1/query endpoint that takes query_obj
URL:
https://github.com/apache/incubator-superset/pull/6220#discussion_r230998825
##########
File path: superset/utils/core.py
##########
@@ -271,7 +272,7 @@ def parse_human_timedelta(s):
"""
cal = parsedatetime.Calendar()
dttm = dttm_from_timtuple(datetime.now().timetuple())
- d = cal.parse(s, dttm)[0]
+ d = cal.parse(s or '', dttm)[0]
Review comment:
reading this I'm wondering what `cal.parse(None)` evals to, and what
`cal.parse('')` evals to.... Seems like logically you could almost be like `if
not s: \n return None`
----------------------------------------------------------------
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]