Fixed the error finding the account in the default_ie_account_code_text pseudo property of the Options data model.

This commit is contained in:
依瑪貓 2023-03-23 00:21:31 +08:00
parent e0355b2af1
commit 2859f628ea

View File

@ -132,7 +132,7 @@ class Options:
code: str = self.default_ie_account_code
if code == CurrentAccount.CURRENT_AL_CODE:
return str(CurrentAccount.current_assets_and_liabilities())
return str(CurrentAccount(db.session.get(Account, code)))
return str(CurrentAccount(Account.find_by_code(code)))
@property
def default_ie_account(self) -> CurrentAccount: