mirror of
https://github.com/YFGaia/dify-plus.git
synced 2026-06-14 20:41:21 +08:00
fix: multiple rows were found correctly (#2219)
This commit is contained in:
@@ -101,7 +101,10 @@ class Account(UserMixin, db.Model):
|
||||
return db.session.query(ai).filter(
|
||||
ai.account_id == self.id
|
||||
).all()
|
||||
|
||||
# check current_user.current_tenant.current_role in ['admin', 'owner']
|
||||
@property
|
||||
def is_admin_or_owner(self):
|
||||
return self._current_tenant.current_role in ['admin', 'owner']
|
||||
|
||||
class Tenant(db.Model):
|
||||
__tablename__ = 'tenants'
|
||||
|
||||
Reference in New Issue
Block a user