Skip to content

Commit cb12bda

Browse files
committed
code cleanup
1 parent 80f2935 commit cb12bda

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

sqlmodel/main.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -593,10 +593,9 @@ def __init__(
593593
def sqlmodel_rebuild(cls) -> None:
594594
reg = cls._sa_registry
595595
# clear any exisiting mappers for the cls
596-
manager = [m for m in reg._managers if m.class_ == cls]
597-
if len(manager) > 0:
598-
for m in manager:
599-
reg._dispose_manager_and_mapper(m)
596+
managers = [m for m in reg._managers if m.class_ == cls]
597+
for m in managers:
598+
reg._dispose_manager_and_mapper(m)
600599
del reg._managers[m]
601600

602601
return cls.__do_init__(cls.__bases__, cls.__dict__, {})

0 commit comments

Comments
 (0)