This is an automated email from the ASF dual-hosted git repository.

serena pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new cde4cdc  fix(sqllab): SqlJsonExecutionContext.query null pointer 
(#16997)
cde4cdc is described below

commit cde4cdcd0cb23f3b4a34172231ae4318456fda54
Author: serenajiang <[email protected]>
AuthorDate: Wed Oct 6 15:40:54 2021 -0700

    fix(sqllab): SqlJsonExecutionContext.query null pointer (#16997)
---
 superset/sqllab/sqllab_execution_context.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/superset/sqllab/sqllab_execution_context.py 
b/superset/sqllab/sqllab_execution_context.py
index 52ba2e7..b44ec61 100644
--- a/superset/sqllab/sqllab_execution_context.py
+++ b/superset/sqllab/sqllab_execution_context.py
@@ -180,7 +180,7 @@ class SqlJsonExecutionContext:  # pylint: 
disable=too-many-instance-attributes
 
     def get_query_details(self) -> str:
         try:
-            if self.query:
+            if hasattr(self, "query"):
                 if self.query.id:
                     return "query '{}' - '{}'".format(self.query.id, 
self.query.sql)
         except DetachedInstanceError:

Reply via email to