We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d25c17 commit 14ab9dcCopy full SHA for 14ab9dc
aredis_om/model/model.py
@@ -2162,10 +2162,11 @@ def schema_for_type(
2162
# a proper type, we can pull the type information from the origin of the first argument.
2163
if not isinstance(typ, type):
2164
type_args = typing_get_args(field_info.annotation)
2165
- if type_args and hasattr(type_args[0], "__origin__"):
2166
- typ = type_args[0].__origin__
2167
- else:
2168
- typ = type_args[0] if type_args else typ
+ typ = (
+ getattr(type_args[0], "__origin__", type_args[0])
+ if type_args
+ else typ
2169
+ )
2170
2171
# TODO: GEO field
2172
if is_vector and vector_options:
0 commit comments