瀏覽代碼

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

Romain Rigaux 9 年之前
父節點
當前提交
36303ce92b
共有 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', '')