Skip to content

Commit 1e662c3

Browse files
author
szachovy
committed
Explicitly define SQL_QUERY_MUTATOR as passthrough function
PR #118 set SQL_QUERY_MUTATOR = None which caused 'NoneType' object is not callable in the Celery sql_lab worker. The previous commit removed that line, but explicitly defining the passthrough function ensures the Superset config module loading path cannot re-introduce a None value regardless of import order or config overlay behavior.
1 parent 753af74 commit 1e662c3

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

services/superset/superset_config.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ class CeleryConfig: # pylint: disable=too-few-public-methods
4343

4444
CELERY_CONFIG = CeleryConfig # pylint: disable=invalid-name
4545
RESULTS_BACKEND = flask_caching.backends.rediscache.RedisCache(host="redis", port=6379, key_prefix="superset_results")
46+
47+
48+
def SQL_QUERY_MUTATOR(sql, **kwargs): # pylint: disable=invalid-name,unused-argument
49+
return sql
50+
51+
4652
SQL_MAX_ROW = 10000
4753
DEFAULT_SQLLAB_LIMIT = 1000
4854
SQLLAB_TIMEOUT = 300

0 commit comments

Comments
 (0)