From ef619c635e8494ebb4d0336b935188e314547183 Mon Sep 17 00:00:00 2001 From: aramesh-site deploy Date: Sun, 27 Sep 2026 10:31:12 +0000 Subject: [PATCH] =?UTF-8?q?fix(chatbot):=20=DA=A9=D9=88=D8=AA=DB=8C=D8=B4?= =?UTF-8?q?=D9=86=20desc=20=D8=AF=D8=B1=20=D8=B3=D9=87=20=DA=A9=D9=88?= =?UTF-8?q?=D8=A6=D8=B1=DB=8C=20=D8=AF=DB=8C=DA=AF=D8=B1=20=D8=A7=DB=8C?= =?UTF-8?q?=D9=86=D8=AF=DA=A9=D8=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit همان باگ قبلی در investment_models/process_steps/why_us/timeline هم بود؛ بدون این، سینک ایندکس ناقص می‌ماند و بخشی از محتوا هرگز بردار نمی‌گرفت. --- chatbot/content.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/chatbot/content.py b/chatbot/content.py index a83b881..9e08bee 100644 --- a/chatbot/content.py +++ b/chatbot/content.py @@ -166,7 +166,7 @@ def fetch_site_documents(database_url: str) -> list[dict]: docs.append(d) # --- مدل‌های سرمایه‌گذاری --- - for row in _fetch_rows(dsn, "SELECT title, desc, points FROM investment_models ORDER BY position"): + for row in _fetch_rows(dsn, 'SELECT title, "desc", points FROM investment_models ORDER BY position'): points = "؛ ".join(_clean(p) for p in (row["points"] or [])) d = _doc( "\n".join(filter(None, [ @@ -179,7 +179,7 @@ def fetch_site_documents(database_url: str) -> list[dict]: docs.append(d) # --- مراحل همکاری --- - for row in _fetch_rows(dsn, "SELECT step, title, desc FROM process_steps ORDER BY position"): + for row in _fetch_rows(dsn, 'SELECT step, title, "desc" FROM process_steps ORDER BY position'): d = _doc( f"مرحله {_clean(row['step'])} — {_clean(row['title'])}: {_clean(row['desc'])}", "process", _clean(row["title"]), "/investment", @@ -188,7 +188,7 @@ def fetch_site_documents(database_url: str) -> list[dict]: docs.append(d) # --- چرا ما / تیم / نظرسنجی / تایم‌لاین / داستان ما --- - for row in _fetch_rows(dsn, "SELECT title, desc FROM why_us ORDER BY position"): + for row in _fetch_rows(dsn, 'SELECT title, "desc" FROM why_us ORDER BY position'): d = _doc(f"{_clean(row['title'])}: {_clean(row['desc'])}", "about", _clean(row["title"]), "/about") if d: docs.append(d) @@ -209,7 +209,7 @@ def fetch_site_documents(database_url: str) -> list[dict]: if d: docs.append(d) - for row in _fetch_rows(dsn, "SELECT year, title, desc FROM timeline ORDER BY position"): + for row in _fetch_rows(dsn, 'SELECT year, title, "desc" FROM timeline ORDER BY position'): d = _doc( f"سال {_clean(row['year'])} — {_clean(row['title'])}: {_clean(row['desc'])}", "timeline", _clean(row["title"]), "/about",