diff --git a/src/accounting/report/utils/ie_account.py b/src/accounting/report/utils/ie_account.py index 96c84fd..cb37dc8 100644 --- a/src/accounting/report/utils/ie_account.py +++ b/src/accounting/report/utils/ie_account.py @@ -71,9 +71,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("ACCOUNTING_DEFAULT_IE_ACCOUNT", - Account.CASH_CODE) + return current_app.config.get("ACCOUNTING_DEFAULT_IE_ACCOUNT", + Account.CASH_CODE) def default_ie_account() -> IncomeExpensesAccount: diff --git a/src/accounting/template_globals.py b/src/accounting/template_globals.py index b4d69be..b43d3c0 100644 --- a/src/accounting/template_globals.py +++ b/src/accounting/template_globals.py @@ -35,5 +35,4 @@ def default_currency_code() -> str: :return: The default currency code. """ - with current_app.app_context(): - return current_app.config.get("ACCOUNTING_DEFAULT_CURRENCY", "USD") + return current_app.config.get("ACCOUNTING_DEFAULT_CURRENCY", "USD")