Skip to content

Commit 9ba5ec9

Browse files
authored
Merge pull request #91 from Worvast/master
Changed method to define default_to
2 parents 2d42993 + 909e678 commit 9ba5ec9

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

devo/api/client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,8 @@ def _get_payload(query, query_id, dates, opts):
387387
:return: Return the formed payload
388388
"""
389389
date_from = default_from(dates['from'])
390-
date_to = default_to(dates['to'])
390+
date_to = default_to(dates['to']) if dates['to'] is not None else None
391+
391392
payload = {
392393
"from":
393394
int(date_from / 1000) if isinstance(date_from, (int, float))

devo/common/dates/dateparser.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,6 @@ def default_to(date=None):
8080
:param date: Date in the accepted formats
8181
:return: Millis for the API
8282
"""
83-
if date is None:
84-
return None
8583

8684
if isinstance(date, int):
8785
if len(str(abs(date))) == 10:

0 commit comments

Comments
 (0)