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 7d333fe commit 32ebd6fCopy full SHA for 32ebd6f
sqlmodel/main.py
@@ -553,8 +553,9 @@ def __new__(
553
# create a dummy attribute to avoid inherit
554
# pydantic will treat it as class variables, and will not become fields on model instances
555
anno = base_annotations.get(k, Any)
556
- dummy_anno = ClassVar[anno]
557
- dict_used["__annotations__"][k] = dummy_anno
+ if get_origin(anno) is not ClassVar:
+ dummy_anno = ClassVar[anno]
558
+ dict_used["__annotations__"][k] = dummy_anno
559
560
if hasattr(base, "__tablename__"):
561
is_polymorphic = True
0 commit comments