fix: SQL Statement on QUERY_LOGGER prints none to log (#14358)
This commit is contained in:
parent
4ac90ddaee
commit
f55882e756
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue