浏览代码

Revert "HUE-5408 [oozie] Fix indentation"

This reverts commit 8455d6944874c635fea7c9f813be3810ad713fce.
krish 8 年之前
父节点
当前提交
7cddaa2
共有 1 个文件被更改,包括 6 次插入5 次删除
  1. 6 5
      apps/oozie/src/oozie/decorators.py

+ 6 - 5
apps/oozie/src/oozie/decorators.py

@@ -62,11 +62,12 @@ def check_document_access_permission():
           # TODO: The commented line should be used once we fully transition to doc2
           # doc2 = Document2.objects.get_by_uuid(user=request.user, uuid=uuid, perm_type=None)
           doc2 = Document2.objects.filter(uuid=uuid).order_by('-last_modified').first()
-          if doc2:
-            if USE_NEW_EDITOR.get():
-              doc2.can_read_or_exception(request.user)
-            else:
-              doc2.doc.get().can_read_or_exception(request.user)
+
+        if doc2:
+          if USE_NEW_EDITOR.get():
+            doc2.can_read_or_exception(request.user)
+          else:
+            doc2.doc.get().can_read_or_exception(request.user)
       except Document2.DoesNotExist:
         raise PopupException(_('Job with %(key)s=%(value)s does not exist') %
                              {'key': 'id' if doc_id else 'uuid', 'value': doc_id or uuid})