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,7 +71,6 @@ 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)
|
||||
|
||||
|
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user