Explorar o código

HUE-4152 [oozie] Managed document property blocks access to workflows of coordinators

One day we might switch to using True, False and None in case we want to retrieve
only the managed ones, but this does not seem useful now and we use this convention
for the other search attributes.
Romain Rigaux %!s(int64=9) %!d(string=hai) anos
pai
achega
e7afa07
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      desktop/core/src/desktop/models.py

+ 2 - 1
desktop/core/src/desktop/models.py

@@ -859,7 +859,8 @@ class Document2QueryMixin(object):
     if not include_history:
       docs = docs.exclude(is_history=True)
 
-    docs = docs.filter(is_managed=include_managed)
+    if not include_managed:
+      docs = docs.exclude(is_managed=True)
 
     if not include_trashed:
       # Since the Trash folder can have multiple directory levels, we need to check full path and exclude those IDs