fix(chatbot): کوتیشن desc در سه کوئری دیگر ایندکس
همان باگ قبلی در investment_models/process_steps/why_us/timeline هم بود؛ بدون این، سینک ایندکس ناقص میماند و بخشی از محتوا هرگز بردار نمیگرفت.
This commit is contained in:
+4
-4
@@ -166,7 +166,7 @@ def fetch_site_documents(database_url: str) -> list[dict]:
|
|||||||
docs.append(d)
|
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 []))
|
points = "؛ ".join(_clean(p) for p in (row["points"] or []))
|
||||||
d = _doc(
|
d = _doc(
|
||||||
"\n".join(filter(None, [
|
"\n".join(filter(None, [
|
||||||
@@ -179,7 +179,7 @@ def fetch_site_documents(database_url: str) -> list[dict]:
|
|||||||
docs.append(d)
|
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(
|
d = _doc(
|
||||||
f"مرحله {_clean(row['step'])} — {_clean(row['title'])}: {_clean(row['desc'])}",
|
f"مرحله {_clean(row['step'])} — {_clean(row['title'])}: {_clean(row['desc'])}",
|
||||||
"process", _clean(row["title"]), "/investment",
|
"process", _clean(row["title"]), "/investment",
|
||||||
@@ -188,7 +188,7 @@ def fetch_site_documents(database_url: str) -> list[dict]:
|
|||||||
docs.append(d)
|
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")
|
d = _doc(f"{_clean(row['title'])}: {_clean(row['desc'])}", "about", _clean(row["title"]), "/about")
|
||||||
if d:
|
if d:
|
||||||
docs.append(d)
|
docs.append(d)
|
||||||
@@ -209,7 +209,7 @@ def fetch_site_documents(database_url: str) -> list[dict]:
|
|||||||
if d:
|
if d:
|
||||||
docs.append(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(
|
d = _doc(
|
||||||
f"سال {_clean(row['year'])} — {_clean(row['title'])}: {_clean(row['desc'])}",
|
f"سال {_clean(row['year'])} — {_clean(row['title'])}: {_clean(row['desc'])}",
|
||||||
"timeline", _clean(row["title"]), "/about",
|
"timeline", _clean(row["title"]), "/about",
|
||||||
|
|||||||
Reference in New Issue
Block a user