diff --git a/app/api/documents.py b/app/api/documents.py index 724eac6..74e8c55 100644 --- a/app/api/documents.py +++ b/app/api/documents.py @@ -192,6 +192,11 @@ async def get_document_tree( FROM documents WHERE ai_domain IS NOT NULL AND ai_domain != '' AND ai_domain != 'News' AND deleted_at IS NULL + -- 문서함(list) 기본 제외와 동일하게 맞춤: 뉴스/법령 채널·메모는 문서함에 안 뜨므로 + -- 트리 카운트도 제외해야 "트리 N건인데 클릭하면 0건" 불일치가 안 생긴다. + AND source_channel != 'news' + AND source_channel != 'law_monitor' + AND file_type != 'note' GROUP BY ai_domain ORDER BY ai_domain """)