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

HUE-3679 [editor] 'unicode' object has no attribute 'is_superuser' when saving a query

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

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

@@ -243,7 +243,7 @@ def save_notebook(request):
 
   if notebook.get('parentUuid'):
     notebook_doc = Document2.objects.get(uuid=notebook['parentUuid'])
-    notebook_doc.can_read_or_exception(notebook['parentUuid'])
+    notebook_doc.can_read_or_exception(request.user)
   elif notebook.get('id'):
     notebook_doc = Document2.objects.get(id=notebook['id'])
   else: