mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-12-12 02:45:18 +00:00
fix: compare keys as uppercase to restore Dynaconf fresh_vars support
This commit is contained in:
parent
1764be1e98
commit
4f5e1f708c
1 changed files with 3 additions and 1 deletions
|
|
@ -12,6 +12,7 @@ def load(obj, env=None, silent=True, key=None, filename=None):
|
||||||
- Replaces list and dict fields instead of appending/updating (non-default Dynaconf behavior).
|
- Replaces list and dict fields instead of appending/updating (non-default Dynaconf behavior).
|
||||||
- Enforces several security checks (e.g., disallows includes/preloads and enforces .toml files).
|
- Enforces several security checks (e.g., disallows includes/preloads and enforces .toml files).
|
||||||
- Supports optional single-key loading.
|
- Supports optional single-key loading.
|
||||||
|
- Supports Dynaconf's fresh_vars feature for dynamic reloading.
|
||||||
Args:
|
Args:
|
||||||
obj: The Dynaconf settings instance to update.
|
obj: The Dynaconf settings instance to update.
|
||||||
env: The current environment name (upper case). Defaults to 'DEVELOPMENT'. Note: currently unused.
|
env: The current environment name (upper case). Defaults to 'DEVELOPMENT'. Note: currently unused.
|
||||||
|
|
@ -93,7 +94,8 @@ def load(obj, env=None, silent=True, key=None, filename=None):
|
||||||
|
|
||||||
# Update the settings object
|
# Update the settings object
|
||||||
for k, v in accumulated_data.items():
|
for k, v in accumulated_data.items():
|
||||||
if key is None or key == k:
|
# For fresh_vars support: key parameter is uppercase, but accumulated_data keys are lowercase
|
||||||
|
if key is None or key.upper() == k.upper():
|
||||||
obj.set(k, v)
|
obj.set(k, v)
|
||||||
|
|
||||||
def validate_file_security(file_data, filename):
|
def validate_file_security(file_data, filename):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue