From fdd2c2fd536af6ec9b654a6207a6f577ed45416f Mon Sep 17 00:00:00 2001 From: NarayanBavisetti Date: Wed, 22 Nov 2023 16:04:47 +0530 Subject: [PATCH] chore: issue comment --- apiserver/plane/api/serializers/issue.py | 1 - apiserver/plane/api/views/issue.py | 2 +- apiserver/plane/api/views/project.py | 7 +++---- apiserver/plane/app/views/issue.py | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/apiserver/plane/api/serializers/issue.py b/apiserver/plane/api/serializers/issue.py index 2dafaa7e6..6fe5ddec1 100644 --- a/apiserver/plane/api/serializers/issue.py +++ b/apiserver/plane/api/serializers/issue.py @@ -61,7 +61,6 @@ class IssueSerializer(BaseSerializer): # Validate assignees are from project if data.get("assignees", []): - print(data.get("assignees")) data["assignees"] = ProjectMember.objects.filter( project_id=self.context.get("project_id"), is_active=True, diff --git a/apiserver/plane/api/views/issue.py b/apiserver/plane/api/views/issue.py index 41745010f..18393b677 100644 --- a/apiserver/plane/api/views/issue.py +++ b/apiserver/plane/api/views/issue.py @@ -450,7 +450,7 @@ class IssueCommentAPIEndpoint(WebhookMixin, BaseAPIView): serializer_class = IssueCommentSerializer model = IssueComment - webhook_event = "issue_comment" + webhook_event = "issue-comment" permission_classes = [ ProjectLitePermission, ] diff --git a/apiserver/plane/api/views/project.py b/apiserver/plane/api/views/project.py index 812a0072e..e8dc9f5a9 100644 --- a/apiserver/plane/api/views/project.py +++ b/apiserver/plane/api/views/project.py @@ -123,10 +123,9 @@ class ProjectAPIEndpoint(WebhookMixin, BaseAPIView): projects, many=True, fields=self.fields, expand=self.expand, ).data, ) - else: - project = self.get_queryset().get(workspace__slug=slug, pk=project_id) - serializer = ProjectSerializer(project, fields=self.fields, expand=self.expand,) - return Response(serializer.data, status=status.HTTP_200_OK) + project = self.get_queryset().get(workspace__slug=slug, pk=project_id) + serializer = ProjectSerializer(project, fields=self.fields, expand=self.expand,) + return Response(serializer.data, status=status.HTTP_200_OK) def post(self, request, slug): try: diff --git a/apiserver/plane/app/views/issue.py b/apiserver/plane/app/views/issue.py index e7605bf14..b03c0ea4f 100644 --- a/apiserver/plane/app/views/issue.py +++ b/apiserver/plane/app/views/issue.py @@ -596,7 +596,7 @@ class IssueActivityEndpoint(BaseAPIView): class IssueCommentViewSet(WebhookMixin, BaseViewSet): serializer_class = IssueCommentSerializer model = IssueComment - webhook_event = "issue_comment" + webhook_event = "issue-comment" permission_classes = [ ProjectLitePermission, ]