Преглед изворни кода

HUE-3859 [editor] History not sending back past queries

Romain Rigaux пре 9 година
родитељ
комит
36303ce
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      desktop/libs/notebook/src/notebook/api.py

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

@@ -366,7 +366,7 @@ def get_history(request):
         'uuid': doc.uuid,
         'type': doc.type,
         'data': {
-            'statement': statement[:1001],
+            'statement': statement[:1001] if statement else '',
             'lastExecuted': notebook['snippets'][0]['lastExecuted'],
             'status':  notebook['snippets'][0]['status'],
             'parentSavedQueryUuid': notebook.get('parentSavedQueryUuid', '')