Skip to content

Commit 3e97ec9

Browse files
authored
Merge pull request #1995 from weaviate/djanicek/safe-vector-check
use get() instead of direct dict access
2 parents a29bbcf + 5dc4887 commit 3e97ec9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

weaviate/collections/classes/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2362,8 +2362,8 @@ def inject_vector_config_none(
23622362
) -> Union[_VectorConfigCreate, List[_VectorConfigCreate], None]:
23632363
if (
23642364
v is None
2365-
and info.data["vectorizerConfig"] is None
2366-
and info.data["vectorIndexConfig"] is None
2365+
and info.data.get("vectorizerConfig") is None
2366+
and info.data.get("vectorIndexConfig") is None
23672367
):
23682368
return _VectorConfigCreate(
23692369
name="default",

0 commit comments

Comments
 (0)