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

HUE-5408 [oozie] Fix indentation

krish пре 8 година
родитељ
комит
8455d69
1 измењених фајлова са 5 додато и 6 уклоњено
  1. 5 6
      apps/oozie/src/oozie/decorators.py

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

@@ -62,12 +62,11 @@ 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})