(self, request, organisation_pk, pk)
| 136 | |
| 137 | @action(detail=True, methods=["POST"], url_path="update-role") |
| 138 | def update_role(self, request, organisation_pk, pk): # type: ignore[no-untyped-def] |
| 139 | user = self.get_object() |
| 140 | organisation = Organisation.objects.get(pk=organisation_pk) |
| 141 | user_organisation = user.get_user_organisation(organisation) |
| 142 | |
| 143 | serializer = self.get_serializer( |
| 144 | instance=user_organisation, data=request.data, partial=True |
| 145 | ) |
| 146 | serializer.is_valid(raise_exception=True) |
| 147 | serializer.save() |
| 148 | |
| 149 | return Response( |
| 150 | UserListSerializer(user, context={"organisation": organisation}).data |
| 151 | ) |
| 152 | |
| 153 | |
| 154 | def password_reset_redirect( |
nothing calls this directly
no test coverage detected