refactor(report): build_overrides + patch_report 통합 / list wholesale merge

- _build_overrides 가 result 받아 deep_merge 까지 처리, _patch_report 제거
- _deep_merge: list by-index → wholesale 치환 (EN 슬롯 누락/라벨 섞임 차단)
- build_facebook_audit: template-copy 대신 LLM logo/logo_description 만 두 페이지에 공통 적용
- _page_patch: language/label 명시 박음 (KR/EN 교차 오염 방지)
- FacebookPage/InstagramAccount/YouTubeAudit: 불필요한 Optional 제거, has_whatsapp/top_content_type 만 Optional 유지
- build_instagram_audit/build_facebook_audit: dict 반환 (overrides[k] = patch 단순 박기)
This commit is contained in:
minaChoi committed 2026-06-02 17:04:33 +09:00
1 parent 9a9ce1319f
commit 5504f79a9d
10 files changed
+144 -173

No files matched your search

+1 -1
View File
@@ -3,7 +3,7 @@ from common.db.hospital import select_hospital, update_hospital_status, insert_h
from common.db.source import (
insert_source, select_source_mainpage, select_source_by_type,
insert_raw_info, update_raw_info_status, update_raw_info, update_raw_info_merge,
update_raw_info_logo_url, select_branding_logo_url, select_branding_info_id,
update_raw_info_logo_url, select_mainpage_logo_url, select_branding_info_id,
select_raw_info_data,
select_run_sources, select_run_raw_data, select_run_source_raw,
select_run_mainpage_url,
+1 -1
View File
@@ -117,7 +117,7 @@ async def select_branding_info_id(analysis_run_id: str) -> int | None:
return (row or {}).get("info_id")
async def select_branding_logo_url(analysis_run_id: str) -> str | None:
async def select_mainpage_logo_url(analysis_run_id: str) -> str | None:
row = await fetchone(
"SELECT ri.logo_url FROM raw_info ri JOIN remote_source rs USING (source_id)"
" WHERE ri.analysis_run_id = %s AND rs.source_type = 'mainpage' LIMIT 1",