소스 검색

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

Romain Rigaux 9 년 전
부모
커밋
2ba34a7
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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]) \