Find more vars that are partially updated.

This commit is contained in:
Feanil Patel
2020-04-09 15:18:57 -04:00
parent 75f663791e
commit bf320f038b
2 changed files with 26 additions and 8 deletions

View File

@@ -47,11 +47,20 @@ with codecs.open(CONFIG_FILE, encoding='utf-8') as f:
# Add the key/values from config into the global namespace of this module.
# But don't override the FEATURES dict because we do that in an additive way.
__config_copy__ = copy.deepcopy(__config__)
if 'FEATURES' in __config_copy__:
del __config_copy__['FEATURES']
if 'EVENT_TRACKING_BACKENDS' in __config_copy__:
del __config_copy__['EVENT_TRACKING_BACKENDS']
KEYS_WITH_MERGED_VALUES = [
'FEATURES',
'TRACKING_BACKENDS',
'EVENT_TRACKING_BACKENDS',
'JWT_AUTH',
'CELERY_QUEUES',
'MKTG_URL_LINK_MAP',
'MKTG_URL_OVERRIDES',
]
for key in KEYS_WITH_MERGED_VALUES:
if key in __config_copy__:
del __config_copy__[key]
vars().update(__config_copy__)

View File

@@ -59,11 +59,20 @@ with codecs.open(CONFIG_FILE, encoding='utf-8') as f:
# Add the key/values from config into the global namespace of this module.
# But don't override the FEATURES dict because we do that in an additive way.
__config_copy__ = copy.deepcopy(__config__)
if 'FEATURES' in __config_copy__:
del __config_copy__['FEATURES']
if 'EVENT_TRACKING_BACKENDS' in __config_copy__:
del __config_copy__['EVENT_TRACKING_BACKENDS']
KEYS_WITH_MERGED_VALUES = [
'FEATURES',
'TRACKING_BACKENDS',
'EVENT_TRACKING_BACKENDS',
'JWT_AUTH',
'CELERY_QUEUES',
'MKTG_URL_LINK_MAP',
'MKTG_URL_OVERRIDES',
]
for key in KEYS_WITH_MERGED_VALUES:
if key in __config_copy__:
del __config_copy__[key]
vars().update(__config_copy__)