Explorar o código

HUE-9143 [editor] Prevent exception when executing an Impala query in editor v2

Johan Ahlen %!s(int64=5) %!d(string=hai) anos
pai
achega
0395adca8d
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      desktop/libs/notebook/src/notebook/api.py

+ 2 - 1
desktop/libs/notebook/src/notebook/api.py

@@ -162,7 +162,8 @@ def _execute_notebook(request, notebook, snippet):
         if 'id' in active_executable: # Editor v2
           # notebook_executable is the 1-to-1 match of active_executable in the notebook structure
           notebook_executable = [e for e in _snippet['executor']['executables'] if e['id'] == active_executable['id']][0]
-          notebook_executable['handle'] = response['handle']
+          if 'handle' in response:
+            notebook_executable['handle'] = response['handle']
           if history:
             notebook_executable['history'] = {
               'id': history.id,