From 77e05a3599a604e1e2c854c0ee7ba30703349eba Mon Sep 17 00:00:00 2001 From: pablohashescobar <118773738+pablohashescobar@users.noreply.github.com> Date: Mon, 5 Jun 2023 17:45:10 +0530 Subject: [PATCH] fix: project member role update (#1205) --- apiserver/plane/api/views/project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apiserver/plane/api/views/project.py b/apiserver/plane/api/views/project.py index 9b2b9ce5e..194638f93 100644 --- a/apiserver/plane/api/views/project.py +++ b/apiserver/plane/api/views/project.py @@ -424,7 +424,7 @@ class ProjectMemberViewSet(BaseViewSet): ) # Check while updating user roles requested_project_member = ProjectMember.objects.get(project_id=project_id, workspace__slug=slug, member=request.user) - if "role" in request.data and request.data.get("role", project_member.role) > requested_project_member.role: + if "role" in request.data and int(request.data.get("role", project_member.role)) > requested_project_member.role: return Response( { "error": "You cannot update a role that is higher than your own role"