Browse Source

[sqlalchemy] Fix check_status for saved queries not having result section in snippet

Harshg999 4 years ago
parent
commit
83c7ee4009
1 changed files with 1 additions and 1 deletions
  1. 1 1
      desktop/libs/notebook/src/notebook/connectors/sql_alchemy.py

+ 1 - 1
desktop/libs/notebook/src/notebook/connectors/sql_alchemy.py

@@ -317,7 +317,7 @@ class SqlAlchemyApi(Api):
 
   @query_error_handler
   def check_status(self, notebook, snippet):
-    guid = snippet['result']['handle']['guid']
+    guid = snippet.get('result', {}).get('handle', {}).get('guid')
     connection = CONNECTIONS.get(guid)
 
     response = {'status': 'canceled'}