Skip to content

Commit 412c267

Browse files
committed
update typing to support older python versions
1 parent 1d23b27 commit 412c267

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

aredis_om/model/model.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1375,7 +1375,7 @@ def outer_type_or_annotation(field: FieldInfo):
13751375
return field.annotation.__args__[0] # type: ignore
13761376

13771377

1378-
def should_index_field(field_info: FieldInfo | PydanticFieldInfo) -> bool:
1378+
def should_index_field(field_info: Union[FieldInfo, PydanticFieldInfo]) -> bool:
13791379
# for vector, full text search, and sortable fields, we always have to index
13801380
# We could require the user to set index=True, but that would be a breaking change
13811381
index = getattr(field_info, "index", None) is True

0 commit comments

Comments
 (0)