Removed a redundant test in the _parse_period_spec function in the "accounting.report.period" module.
This commit is contained in:
parent
4f7f87b10d
commit
ba3d8c6d4e
@ -563,9 +563,6 @@ def _parse_period_spec(text: str) \
|
||||
may be None.
|
||||
:raise ValueError: When the date is invalid.
|
||||
"""
|
||||
if text == "this-month":
|
||||
today: datetime.date = datetime.date.today()
|
||||
return datetime.date(today.year, today.month, 1), _month_end(today)
|
||||
if text == "-":
|
||||
return None, None
|
||||
m = re.match(r"^(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?$", text)
|
||||
|
Loading…
Reference in New Issue
Block a user