Skip to content

Commit dc35ea2

Browse files
author
Patrick Weizhi Xu
authored
fix: [2.5] should not modify users search_param, copy instead (milvus-io#2578)
issue: milvus-io#2576 pr: milvus-io#2577 Signed-off-by: Patrick Weizhi Xu <[email protected]> (cherry picked from commit 5050421)
1 parent 28012ec commit dc35ea2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pymilvus/client/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import datetime
22
import importlib.util
3+
from copy import deepcopy
34
from datetime import timedelta
45
from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Optional, Tuple, Union
56

@@ -277,7 +278,7 @@ def get_params(search_params: Dict):
277278
# no more parameters will be written searchParams.params
278279
# to ensure compatibility and milvus can still get a json format parameter
279280
# try to write all the parameters under searchParams into searchParams.Params
280-
params = search_params.get("params", {})
281+
params = deepcopy(search_params.get("params", {}))
281282
for key, value in search_params.items():
282283
if key in params:
283284
if params[key] != value:

0 commit comments

Comments
 (0)