mirror of
https://github.com/inventree/InvenTree.git
synced 2025-10-14 21:22:20 +00:00
chore(backend)!: fix spelling (#10557)
* fix spelling * add changelog entry
This commit is contained in:
@@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
### Changed
|
||||
|
||||
- Changed site URL check to allow protocol mismatches if `INVENTREE_SITE_LAX_PROTOCOL` is set to `True` (default) in [#10454](https://github.com/inventree/InvenTree/pull/10454)
|
||||
- Changed call signature of `get_global_setting` to use `environment_key` instead of `enviroment_key` in [#10557](https://github.com/inventree/InvenTree/pull/10557)
|
||||
|
||||
### Removed
|
||||
|
||||
|
@@ -298,7 +298,7 @@ def inventree_identifier(override_announce: bool = False):
|
||||
from common.settings import get_global_setting
|
||||
|
||||
if override_announce or get_global_setting(
|
||||
'INVENTREE_ANNOUNCE_ID', enviroment_key='INVENTREE_ANNOUNCE_ID'
|
||||
'INVENTREE_ANNOUNCE_ID', environment_key='INVENTREE_ANNOUNCE_ID'
|
||||
):
|
||||
return get_global_setting('INVENTREE_INSTANCE_ID', default='')
|
||||
return None
|
||||
|
@@ -48,7 +48,7 @@ def currency_codes() -> list:
|
||||
from common.settings import get_global_setting
|
||||
|
||||
codes = get_global_setting(
|
||||
'CURRENCY_CODES', create=False, enviroment_key='INVENTREE_CURRENCY_CODES'
|
||||
'CURRENCY_CODES', create=False, environment_key='INVENTREE_CURRENCY_CODES'
|
||||
).strip()
|
||||
|
||||
if not codes:
|
||||
|
@@ -26,12 +26,12 @@ def global_setting_overrides() -> dict:
|
||||
return {}
|
||||
|
||||
|
||||
def get_global_setting(key, backup_value=None, enviroment_key=None, **kwargs):
|
||||
def get_global_setting(key, backup_value=None, environment_key=None, **kwargs):
|
||||
"""Return the value of a global setting using the provided key."""
|
||||
from common.models import InvenTreeSetting
|
||||
|
||||
if enviroment_key:
|
||||
value = environ.get(enviroment_key)
|
||||
if environment_key:
|
||||
value = environ.get(environment_key)
|
||||
if value:
|
||||
return value
|
||||
|
||||
|
Reference in New Issue
Block a user