mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
fix: SQL Statement on QUERY_LOGGER prints none to log (#14358)
This commit is contained in:
@@ -232,6 +232,7 @@ def execute_sql_statement(
|
||||
# Hook to allow environment-specific mutation (usually comments) to the SQL
|
||||
sql = SQL_QUERY_MUTATOR(sql, user_name, security_manager, database)
|
||||
try:
|
||||
query.executed_sql = sql
|
||||
if log_query:
|
||||
log_query(
|
||||
query.database.sqlalchemy_uri,
|
||||
@@ -242,7 +243,6 @@ def execute_sql_statement(
|
||||
security_manager,
|
||||
log_params,
|
||||
)
|
||||
query.executed_sql = sql
|
||||
session.commit()
|
||||
with stats_timing("sqllab.query.time_executing_query", stats_logger):
|
||||
logger.debug("Query %d: Running query: %s", query.id, sql)
|
||||
|
||||
Reference in New Issue
Block a user