def add_expense(self, bank_action: MbankAction) -> None: """Adds an expense to the database.""" bank_action.amount_pln *= -1 self.bank_actions.insert(None).execute(**bank_action.asdict())
def add_positive_transfer(self, positive_action: MbankAction) -> None: """Adds a positive transfer to the database.""" self.bank_actions.insert(None).execute(**positive_action.asdict())