Skip to content

Commit be1202a

Browse files
committed
Temporarily revert changes to verify that the tests pass
1 parent 94cd8e3 commit be1202a

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

sqlmodel/main.py

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -585,23 +585,9 @@ def get_config(name: str) -> Any:
585585
setattr(new_cls, "__abstract__", True) # noqa: B010
586586
return new_cls
587587

588-
def __init__(
589-
cls, classname: str, bases: Tuple[type, ...], dict_: Dict[str, Any], **kw: Any
590-
) -> None:
591-
return cls.__do_init__(bases, dict_, kw) # type: ignore
592-
593-
def sqlmodel_rebuild(cls) -> None:
594-
reg = cls._sa_registry
595-
# clear any exisiting mappers for the cls
596-
managers = [m for m in reg._managers if m.class_ == cls]
597-
for m in managers:
598-
reg._dispose_manager_and_mapper(m)
599-
del reg._managers[m]
600-
601-
return cls.__do_init__(cls.__bases__, cls.__dict__, {}) # type: ignore
602-
588+
# Temporarily revert changes to verify that the tests pass
603589
# Override SQLAlchemy, allow both SQLAlchemy and plain Pydantic models
604-
def __do_init__(
590+
def __init__(
605591
cls, classname: str, bases: Tuple[type, ...], dict_: Dict[str, Any], **kw: Any
606592
) -> None:
607593
# Only one of the base classes (or the current one) should be a table model

0 commit comments

Comments
 (0)