Fixed the __get_accounts method of the DescriptionEditor class not to do empty queries.

This commit is contained in:
依瑪貓 2023-03-22 19:17:25 +08:00
parent 671dbfb692
commit 89e43830b4

View File

@ -300,6 +300,9 @@ class DescriptionEditor:
:param codes: The account codes.
:return: The account.
"""
if len(codes) == 0:
return {}
def get_condition(code0: str) -> sa.BinaryExpression:
m: re.Match = re.match(r"^(\d{4})-(\d{3})$", code0)
assert m is not None,\