diff --git a/freqtrade/configuration/timerange.py b/freqtrade/configuration/timerange.py index adc5e65df..0c2f0d1b8 100644 --- a/freqtrade/configuration/timerange.py +++ b/freqtrade/configuration/timerange.py @@ -116,7 +116,7 @@ class TimeRange: :param text: value from --timerange :return: Start and End range period """ - if text is None: + if not text: return TimeRange(None, None, 0, 0) syntax = [(r'^-(\d{8})$', (None, 'date')), (r'^(\d{8})-$', ('date', None)), diff --git a/tests/test_timerange.py b/tests/test_timerange.py index 06ff1983a..993b24d95 100644 --- a/tests/test_timerange.py +++ b/tests/test_timerange.py @@ -10,6 +10,8 @@ from freqtrade.exceptions import OperationalException def test_parse_timerange_incorrect(): + timerange = TimeRange.parse_timerange('') + assert timerange == TimeRange(None, None, 0, 0) timerange = TimeRange.parse_timerange('20100522-') assert TimeRange('date', None, 1274486400, 0) == timerange assert timerange.timerange_str == '20100522-'