feat: add fix-app-site-missing command (#5711)

This commit is contained in:
takatost
2024-06-28 20:20:23 +08:00
committed by GitHub
parent a2c260fba0
commit d30c13891b
2 changed files with 43 additions and 2 deletions

View File

@@ -153,8 +153,7 @@ class Tenant(db.Model):
created_at = db.Column(db.DateTime, nullable=False, server_default=db.text('CURRENT_TIMESTAMP(0)'))
updated_at = db.Column(db.DateTime, nullable=False, server_default=db.text('CURRENT_TIMESTAMP(0)'))
def get_accounts(self) -> list[db.Model]:
Account = db.Model
def get_accounts(self) -> list[Account]:
return db.session.query(Account).filter(
Account.id == TenantAccountJoin.account_id,
TenantAccountJoin.tenant_id == self.id