Moved the tag initialization from the constructor to the __init_tags method in the DescriptionEditor class.

This commit is contained in:
依瑪貓 2023-03-21 17:32:07 +08:00
parent 2f3ad99467
commit 8818b46e01

View File

@ -206,6 +206,13 @@ class DescriptionEditor:
"""The debit tags.""" """The debit tags."""
self.credit: DescriptionDebitCredit = DescriptionDebitCredit("credit") self.credit: DescriptionDebitCredit = DescriptionDebitCredit("credit")
"""The credit tags.""" """The credit tags."""
self.__init_tags()
def __init_tags(self):
"""Initializes the tags.
:return: None.
"""
debit_credit: sa.Label = sa.case( debit_credit: sa.Label = sa.case(
(JournalEntryLineItem.is_debit, "debit"), (JournalEntryLineItem.is_debit, "debit"),
else_="credit").label("debit_credit") else_="credit").label("debit_credit")