Skip to content

Commit c2a3cc6

Browse files
author
Tianyi Pan
committed
Fix query params again
1 parent 69371f5 commit c2a3cc6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/app.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,15 @@ def get_vector_db(file_path: Path) -> Chroma:
9696
return Chroma(persist_directory=str(file_path), embedding_function=embeddings)
9797

9898
# Get query parameters
99-
query_params = st.query_params()
100-
if "debug" in query_params and query_params["debug"][0].lower() == "true":
99+
query_params = st.query_params
100+
if "debug" in query_params and query_params["debug"].lower() == "true":
101101
st.session_state.DEBUG = True
102102

103103
if "DEBUG" in st.session_state and st.session_state.DEBUG:
104104
DEBUG = True
105105

106106
if "site" in query_params:
107-
args.config = Path("cfg") / f"""{query_params["site"][0].lower()}.cfg"""
107+
args.config = Path("cfg") / f"""{query_params["site"].lower()}.cfg"""
108108

109109
if args.config is None:
110110
st.error("No site specified!")

0 commit comments

Comments
 (0)