Get Workspace.owner from role, not from request creator
This commit is contained in:
parent
287fcf7e3e
commit
379461e6fb
@ -18,7 +18,14 @@ class Workspace(Base, TimestampsMixin):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def owner(self):
|
def owner(self):
|
||||||
return self.request.creator
|
return next(
|
||||||
|
(
|
||||||
|
workspace_role.user
|
||||||
|
for workspace_role in self.roles
|
||||||
|
if workspace_role.role.name == "owner"
|
||||||
|
),
|
||||||
|
None,
|
||||||
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def users(self):
|
def users(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user