From c42cd57a32cde334e3b1b0d55e4e7ee2b7d7b595 Mon Sep 17 00:00:00 2001 From: Eyal Schuller Date: Mon, 9 Jun 2025 20:54:06 +0300 Subject: [PATCH] chore: Update variable naming in postgres store (#4096) Co-authored-by: William FH <13333726+hinthornw@users.noreply.github.com> --- .../langgraph/store/postgres/base.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libs/checkpoint-postgres/langgraph/store/postgres/base.py b/libs/checkpoint-postgres/langgraph/store/postgres/base.py index dcdb47f2c..6b57cebae 100644 --- a/libs/checkpoint-postgres/langgraph/store/postgres/base.py +++ b/libs/checkpoint-postgres/langgraph/store/postgres/base.py @@ -1317,12 +1317,12 @@ def _ensure_index_config( index_config = index_config.copy() tokenized: list[tuple[str, Literal["$"] | list[str]]] = [] tot = 0 - text_fields = index_config.get("fields") or ["$"] - if isinstance(text_fields, str): - text_fields = [text_fields] - if not isinstance(text_fields, list): - raise ValueError(f"Text fields must be a list or a string. Got {text_fields}") - for p in text_fields: + fields = index_config.get("fields") or ["$"] + if isinstance(fields, str): + fields = [fields] + if not isinstance(fields, list): + raise ValueError(f"Text fields must be a list or a string. Got {fields}") + for p in fields: if p == "$": tokenized.append((p, "$")) tot += 1