Skip to content

Commit 7ea6d51

Browse files
Fixed a SQLAlchemy model problem where cascade was going the wrong way
1 parent 4ed648a commit 7ea6d51

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

utils/models.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,7 @@ class PasswordResetToken(SQLModel, table=True):
8080
used: bool = Field(default=False)
8181

8282
user: Optional["User"] = Relationship(
83-
back_populates="password_reset_tokens",
84-
sa_relationship_kwargs={"cascade": "all, delete-orphan"}
85-
)
83+
back_populates="password_reset_tokens")
8684

8785

8886
class User(SQLModel, table=True):

0 commit comments

Comments
 (0)