From 8a9bb87dfba91cd8b469d62cd4bfe041fcb13b2d Mon Sep 17 00:00:00 2001 From: NarayanBavisetti Date: Thu, 6 Jun 2024 17:00:25 +0530 Subject: [PATCH] chore: is_deployed changed to anchor --- apiserver/plane/app/serializers/project.py | 4 ++-- apiserver/plane/app/views/project/base.py | 11 +++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/apiserver/plane/app/serializers/project.py b/apiserver/plane/app/serializers/project.py index d9ea99f1e..1bbc580c1 100644 --- a/apiserver/plane/app/serializers/project.py +++ b/apiserver/plane/app/serializers/project.py @@ -114,7 +114,7 @@ class ProjectListSerializer(DynamicBaseSerializer): is_member = serializers.BooleanField(read_only=True) sort_order = serializers.FloatField(read_only=True) member_role = serializers.IntegerField(read_only=True) - is_deployed = serializers.BooleanField(read_only=True) + anchor = serializers.CharField(read_only=True) members = serializers.SerializerMethodField() def get_members(self, obj): @@ -148,7 +148,7 @@ class ProjectDetailSerializer(BaseSerializer): is_member = serializers.BooleanField(read_only=True) sort_order = serializers.FloatField(read_only=True) member_role = serializers.IntegerField(read_only=True) - is_deployed = serializers.BooleanField(read_only=True) + anchor = serializers.CharField(read_only=True) class Meta: model = Project diff --git a/apiserver/plane/app/views/project/base.py b/apiserver/plane/app/views/project/base.py index f6f8e951c..7e3326e02 100644 --- a/apiserver/plane/app/views/project/base.py +++ b/apiserver/plane/app/views/project/base.py @@ -137,12 +137,11 @@ class ProjectViewSet(BaseViewSet): ).values("role") ) .annotate( - is_deployed=Exists( - DeployBoard.objects.filter( - project_id=OuterRef("pk"), - workspace__slug=self.kwargs.get("slug"), - ) - ) + anchor=DeployBoard.objects.filter( + entity_name="project", + entity_identifier=OuterRef("pk"), + workspace__slug=self.kwargs.get("slug"), + ).values("anchor") ) .annotate(sort_order=Subquery(sort_order)) .prefetch_related(