From a605b32972caa7552c79fa39ef2cea0dcdd9db3a Mon Sep 17 00:00:00 2001 From: Dylan Young Date: Mon, 23 May 2022 20:17:44 -0300 Subject: [PATCH] TEMP --- csp/conf/deprecation.py | 3 +-- csp/utils.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/csp/conf/deprecation.py b/csp/conf/deprecation.py index 9ff2d3f..fa80f02 100644 --- a/csp/conf/deprecation.py +++ b/csp/conf/deprecation.py @@ -21,7 +21,7 @@ } -def _handle_legacy_settings(definitions, allow_legacy): +def _handle_legacy_settings(csp, allow_legacy): """ Custom defaults allow you to set values for csp directives that will apply to all CSPs defined in CSP_DEFINITIONS, avoiding @@ -44,7 +44,6 @@ def _handle_legacy_settings(definitions, allow_legacy): LEGACY_SETTINGS_NAMES_DEPRECATION_WARNING % ', '.join(legacy_names), DeprecationWarning, ) - csp = definitions["default"] legacy_csp = ( setting_to_directive(name, value=getattr(settings, name)) for name in legacy_names if name not in csp diff --git a/csp/utils.py b/csp/utils.py index d3ad635..488bf4e 100644 --- a/csp/utils.py +++ b/csp/utils.py @@ -40,7 +40,7 @@ def get_declared_policy_definitions(): ), ) deprecation._handle_legacy_settings( - custom_definitions, + custom_definitions['default'], allow_legacy=True # not hasattr(settings, 'CSP_POLICY_DEFINITIONS'), ) definitions = csp_definitions_update(