From af71874f9d92c7cf1dc643b24e5c1dca8df10058 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Thu, 9 Mar 2023 22:20:24 +0800 Subject: [PATCH] Fixed an error checking if there is any data in the PeriodChooser utility. --- src/accounting/report/period/chooser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/accounting/report/period/chooser.py b/src/accounting/report/period/chooser.py index 54c8614..223c112 100644 --- a/src/accounting/report/period/chooser.py +++ b/src/accounting/report/period/chooser.py @@ -79,7 +79,7 @@ class PeriodChooser: self.available_years: list[int] = [] """The available years.""" - if self.has_data is not None: + if self.has_data: today: date = date.today() self.has_last_month = start < date(today.year, today.month, 1) self.has_last_year = start.year < today.year