Fixed the logic for all-time in the period_spec function in the "accounting.report.reports.utils.csv_export" module.

This commit is contained in:
依瑪貓 2023-03-08 14:44:18 +08:00
parent f30a96d7e9
commit 26b70bb625

View File

@ -65,10 +65,10 @@ def period_spec(period: Period) -> str:
"""
start: str | None = __get_start_str(period.start)
end: str | None = __get_end_str(period.end)
if start == end:
return start
if period.start is None and period.end is None:
return "all-time"
if start == end:
return start
if period.start is None:
return f"until-{end}"
if period.end is None: