Fixed an error checking if there is any data in the PeriodChooser utility.

This commit is contained in:
依瑪貓 2023-03-09 22:20:24 +08:00
parent 3fa8818a27
commit af71874f9d

View File

@ -79,7 +79,7 @@ class PeriodChooser:
self.available_years: list[int] = [] self.available_years: list[int] = []
"""The available years.""" """The available years."""
if self.has_data is not None: if self.has_data:
today: date = date.today() today: date = date.today()
self.has_last_month = start < date(today.year, today.month, 1) self.has_last_month = start < date(today.year, today.month, 1)
self.has_last_year = start.year < today.year self.has_last_year = start.year < today.year