Przeglądaj źródła

HUE-3293 [core] Prevent document matching query error when going one home 1

Romain Rigaux 9 lat temu
rodzic
commit
2ba34a7
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      desktop/core/src/desktop/api.py

+ 1 - 1
desktop/core/src/desktop/api.py

@@ -38,7 +38,7 @@ def _get_docs(user):
   history_tag = DocumentTag.objects.get_history_tag(user)
 
   dir_ids = [directory.doc.get().id for directory in Directory.objects.filter(doc__isnull=False)]
-  editor_ids = [document.doc.get().id for document in Document2.objects.filter(type__startswith='query')]
+  editor_ids = [document.doc.get().id for document in Document2.objects.filter(type__startswith='query', doc__isnull=False)]
 
   query = Document.objects.get_docs(user) \
       .exclude(tags__in=[history_tag]) \