Renamed the configuration DEFAULT_CURRENCY, DEFAULT_IE_ACCOUNT, and RECURRING to "ACCOUNTING_DEFAULT_CURRENCY", "ACCOUNTING_DEFAULT_IE_ACCOUNT", and "ACCOUNTING_RECURRING", respectively.

This commit is contained in:
imacat committed 2023-03-21 21:13:03 +08:00
1 parent a82f5091f1
commit a42e7d13a2
4 files changed
+6 -5

No files matched your search

+2 -1
View File
@@ -72,7 +72,8 @@ def default_ie_account_code() -> str:
:return: The default account code for the income and expenses log.
"""
with current_app.app_context():
return current_app.config.get("DEFAULT_IE_ACCOUNT", Account.CASH_CODE)
return current_app.config.get("ACCOUNTING_DEFAULT_IE_ACCOUNT",
Account.CASH_CODE)
def default_ie_account() -> IncomeExpensesAccount: