浏览代码

HUE-3889 [core] uuid of documents and json do not match in sample queries

Romain Rigaux 9 年之前
父节点
当前提交
073505075e
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      desktop/core/src/desktop/api2.py

+ 2 - 0
desktop/core/src/desktop/api2.py

@@ -163,6 +163,8 @@ def get_document(request):
       notebook = Notebook(document=document)
       notebook = upgrade_session_properties(request, notebook)
       data = json.loads(notebook.data)
+      if 'uuid' not in data:
+        data['uuid'] = document.uuid
 
     response['data'] = data