Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Correctly update reactive form on hosted instances #6023

Merged
merged 4 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/backend/base/langflow/components/vectorstores/astradb.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ def update_build_config(self, build_config: dict, field_value: str, field_name:

# Reload the list of collections and metadata associated
collection_options = self._initialize_collection_options(
api_endpoint=build_config["d_api_endpoint"]["value"]
api_endpoint=build_config["d_api_endpoint"]["value"] if not dslf else None
)

# If we have collections, show the dropdown
Expand All @@ -562,12 +562,12 @@ def update_build_config(self, build_config: dict, field_value: str, field_name:
build_config["autodetect_collection"]["value"] = True

# Find location of the name in the options list
index_of_name = build_config["collection_name"]["options"].index(field_value)

# Return if not found
if index_of_name == -1:
if field_value not in build_config["collection_name"]["options"]:
return build_config

# Find the position of the selected collection to align with metadata
index_of_name = build_config["collection_name"]["options"].index(field_value)

# Check if the number of records is 0
if build_config["collection_name"]["options_metadata"][index_of_name]["records"] == 0:
build_config["autodetect_collection"]["value"] = False
Expand Down
Loading
Loading