Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion docarray/base_doc/doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ def _exclude_doclist(
from docarray.array.any_array import AnyDocArray

type_ = self._get_field_annotation(field)
if isinstance(type_, type) and issubclass(type_, AnyDocArray):
if isinstance(type_, type) and safe_issubclass(type_, AnyDocArray):
doclist_exclude_fields.append(field)

original_exclude = exclude
Expand Down
4 changes: 2 additions & 2 deletions docarray/index/backends/milvus.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def python_type_to_db_type(self, python_type: Type) -> Any:
AbstractTensor: DataType.FLOAT_VECTOR,
}

if issubclass(python_type, ID):
if safe_issubclass(python_type, ID):
return DataType.VARCHAR

for py_type, db_type in type_map.items():
Expand Down Expand Up @@ -665,7 +665,7 @@ def find_batched(
if search_field:
if '__' in search_field:
fields = search_field.split('__')
if issubclass(self._schema._get_field_annotation(fields[0]), AnyDocArray): # type: ignore
if safe_issubclass(self._schema._get_field_annotation(fields[0]), AnyDocArray): # type: ignore
return self._subindices[fields[0]].find_batched(
queries,
search_field='__'.join(fields[1:]),
Expand Down