修复cookie失效后的一些问题

This commit is contained in:
2026-04-01 15:09:21 +08:00
parent 3c50cfcfc5
commit 30bddea103
4 changed files with 24 additions and 3 deletions

View File

@@ -24,7 +24,7 @@ class Account(Base):
user = relationship("User", back_populates="accounts")
tasks = relationship("Task", back_populates="account", cascade="all, delete-orphan")
signin_logs = relationship("SigninLog", back_populates="account")
signin_logs = relationship("SigninLog", back_populates="account", cascade="all, delete-orphan", passive_deletes=True)
def __repr__(self):
return f"<Account(id={self.id}, weibo_user_id='{self.weibo_user_id}')>"