| ) # TODO: only owner information is required, so only one is returned. | ) # TODO: only owner information is required, so only one is returned. | ||||
| if tenant_account_join: | if tenant_account_join: | ||||
| tenant, ta = tenant_account_join | tenant, ta = tenant_account_join | ||||
| account = Account.query.filter_by(id=ta.account_id).first() | |||||
| account = db.session.query(Account).filter(Account.id == ta.account_id).first() | |||||
| # Login admin | # Login admin | ||||
| if account: | if account: | ||||
| account.current_tenant = tenant | account.current_tenant = tenant |