Removed the redundant Flask App context from the default_currency_code Jinja2 global and the default_ie_account_code function. They are always under the Flask app context.
This commit is contained in:
parent
446087b212
commit
9248ba7e3b
@ -71,9 +71,8 @@ def default_ie_account_code() -> str:
|
|||||||
|
|
||||||
:return: The default account code for the income and expenses log.
|
: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",
|
||||||
return current_app.config.get("ACCOUNTING_DEFAULT_IE_ACCOUNT",
|
Account.CASH_CODE)
|
||||||
Account.CASH_CODE)
|
|
||||||
|
|
||||||
|
|
||||||
def default_ie_account() -> IncomeExpensesAccount:
|
def default_ie_account() -> IncomeExpensesAccount:
|
||||||
|
@ -35,5 +35,4 @@ def default_currency_code() -> str:
|
|||||||
|
|
||||||
:return: The default currency code.
|
: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")
|
|
||||||
|
Loading…
Reference in New Issue
Block a user