Skip to content

Commit 72cb36f

Browse files
committed
bugfixes][collection-query] Fixes #5857 - Fix mutable default argument while querying a collection
1 parent 5a60dee commit 72cb36f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

chromadb/api/models/CollectionCommon.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,8 @@ def _validate_and_prepare_query_request(
343343
request_where_document = filters["where_document"]
344344

345345
# We need to manually include uris in the result from the API to load datas
346-
request_include = include
346+
# Copy the list before any in-place modifications.
347+
request_include = list(include) if include else []
347348
if "data" in request_include and "uris" not in request_include:
348349
request_include.append("uris")
349350

0 commit comments

Comments
 (0)