Skip to content

Commit

Permalink
fix: workspace member role update (#1203)
Browse files Browse the repository at this point in the history
  • Loading branch information
pablohashescobar committed Jun 5, 2023
1 parent 799cf23 commit bffc6a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apiserver/plane/api/views/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ def partial_update(self, request, slug, pk):
requested_workspace_member = WorkspaceMember.objects.get(workspace__slug=slug, member=request.user)
# Check if role is being updated
# One cannot update role higher than his own role
if "role" in request.data and request.data.get("role", workspace_member.role) > requested_workspace_member.role:
if "role" in request.data and int(request.data.get("role", workspace_member.role)) > requested_workspace_member.role:
return Response(
{
"error": "You cannot update a role that is higher than your own role"
Expand Down

0 comments on commit bffc6a6

Please sign in to comment.