fix: exclude current issue type from the list of issue types in IssueTypeEndpoint (#3451)

This commit is contained in:
Nikhil
2025-06-19 00:07:47 +05:30
committed by GitHub
parent bea5a806f0
commit 4e029bc5be

View File

@@ -175,11 +175,15 @@ class IssueTypeEndpoint(BaseAPIView):
is_epic=False,
pk=pk,
)
issue_types = IssueType.objects.filter(
workspace__slug=slug,
project_issue_types__project_id=project_id,
is_epic=False,
).values_list("name", flat=True)
issue_types = (
IssueType.objects.filter(
workspace__slug=slug,
project_issue_types__project_id=project_id,
is_epic=False,
)
.exclude(pk=pk)
.values_list("name", flat=True)
)
# Default cannot be made in active
if issue_type.is_default and not request.data.get("is_active"):