mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
Move feature flag utility function into superset/__init__.py
This commit is contained in:
@@ -212,6 +212,14 @@ results_backend = app.config.get('RESULTS_BACKEND')
|
||||
feature_flags = app.config.get('DEFAULT_FEATURE_FLAGS')
|
||||
feature_flags.update(app.config.get('FEATURE_FLAGS') or {})
|
||||
|
||||
|
||||
def is_feature_enabled(feature):
|
||||
"""
|
||||
Utility function for checking whether a feature is turned on
|
||||
"""
|
||||
return feature_flags.get(feature)
|
||||
|
||||
|
||||
# Registering sources
|
||||
module_datasource_map = app.config.get('DEFAULT_MODULE_DS_MAP')
|
||||
module_datasource_map.update(app.config.get('ADDITIONAL_MODULE_DS_MAP'))
|
||||
|
||||
Reference in New Issue
Block a user