From 3f63fb0bda56fdcc849b0a43d64171f124e0741f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Fri, 24 Feb 2023 00:18:55 +0800 Subject: [PATCH] Fixed a type hint in the populate_obj method of the AccountForm form. --- src/accounting/account/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/accounting/account/forms.py b/src/accounting/account/forms.py index 257fc99..a2b82a1 100644 --- a/src/accounting/account/forms.py +++ b/src/accounting/account/forms.py @@ -81,7 +81,7 @@ class AccountForm(FlaskForm): obj.id = new_id(Account) obj.base_code = self.base_code.data if prev_base_code != self.base_code.data: - max_no: int = db.session.scalars( + max_no: int | None = db.session.scalars( sa.select(sa.func.max(Account.no)) .filter(Account.base_code == self.base_code.data)).one() obj.no = 1 if max_no is None else max_no + 1