Fixed the documentation in the Account data model.

This commit is contained in:
依瑪貓 2023-02-07 11:30:25 +08:00
parent f7ce94902f
commit 16e2a146db

View File

@ -191,11 +191,10 @@ class Account(db.Model):
@classmethod @classmethod
def find_by_code(cls, code: str) -> t.Self | None: def find_by_code(cls, code: str) -> t.Self | None:
"""Finds an accounting account by its code. """Finds an account by its code.
:param code: The code. :param code: The code.
:return: The accounting account, or None if this account does not :return: The account, or None if this account does not exist.
exist.
""" """
m = re.match("^([1-9]{4})-([0-9]{3})$", code) m = re.match("^([1-9]{4})-([0-9]{3})$", code)
if m is None: if m is None:
@ -306,7 +305,7 @@ class Account(db.Model):
return False return False
def delete(self) -> None: def delete(self) -> None:
"""Deletes this accounting account. """Deletes this account.
:return: None. :return: None.
""" """