diff --git a/CHANGELOG.md b/CHANGELOG.md index b8b070d33b..da05a36c85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/backend/InvenTree/InvenTree/version.py b/src/backend/InvenTree/InvenTree/version.py index 08b8bea05d..ca699f0190 100644 --- a/src/backend/InvenTree/InvenTree/version.py +++ b/src/backend/InvenTree/InvenTree/version.py @@ -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 diff --git a/src/backend/InvenTree/common/currency.py b/src/backend/InvenTree/common/currency.py index f2fe3d76bd..307e54d6d5 100644 --- a/src/backend/InvenTree/common/currency.py +++ b/src/backend/InvenTree/common/currency.py @@ -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: diff --git a/src/backend/InvenTree/common/settings.py b/src/backend/InvenTree/common/settings.py index 87a1e5dff0..c721d8c346 100644 --- a/src/backend/InvenTree/common/settings.py +++ b/src/backend/InvenTree/common/settings.py @@ -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