mirror of
https://github.com/davidhalter/django-stubs.git
synced 2026-10-18 20:11:29 +08:00
Don't serialize annotated types (#881)
Signed-off-by: Sebastian Wagner <sebastian@inter.link> Co-authored-by: Sebastian Wagner <sebastian@inter.link>
This commit is contained in:
1 parent
10e06947d7
commit
32a33c332d
1 file changed
+1
@@ -533,6 +533,7 @@ def get_or_create_annotated_type(
|
||||
type_name,
|
||||
bases=[model_type] if fields_dict is not None else [model_type, annotated_model_type],
|
||||
fields=fields_dict.items if fields_dict is not None else None,
|
||||
no_serialize=True,
|
||||
)
|
||||
if fields_dict is not None:
|
||||
# To allow structural subtyping, make it a Protocol
|
||||
|
||||
Reference in new issue
Block a user