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

HUE-3474 [editor] uuid of document2 and editor uuid field are mismatching

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

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

@@ -241,7 +241,7 @@ def save_notebook(request):
   if notebook.get('id'):
     notebook_doc = Document2.objects.get(id=notebook['id'])
   else:
-    notebook_doc = Document2.objects.create(name=notebook['name'], type=notebook_type, owner=request.user)
+    notebook_doc = Document2.objects.create(name=notebook['name'], uuid=notebook['uuid'], type=notebook_type, owner=request.user)
     Document.objects.link(notebook_doc, owner=notebook_doc.owner, name=notebook_doc.name, description=notebook_doc.description, extra=notebook_type)
 
   notebook_doc1 = notebook_doc.doc.get()