From c4609b95cd0b61ca3169b39f9e35993ca69cf1da Mon Sep 17 00:00:00 2001 From: pablohashescobar <118773738+pablohashescobar@users.noreply.github.com> Date: Thu, 13 Apr 2023 00:34:37 +0530 Subject: [PATCH] fix: remove length check condition when updating issue property (#791) --- apiserver/plane/api/serializers/issue.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apiserver/plane/api/serializers/issue.py b/apiserver/plane/api/serializers/issue.py index d197fb843..a39128088 100644 --- a/apiserver/plane/api/serializers/issue.py +++ b/apiserver/plane/api/serializers/issue.py @@ -183,7 +183,7 @@ class IssueCreateSerializer(BaseSerializer): labels = validated_data.pop("labels_list", None) blocks = validated_data.pop("blocks_list", None) - if blockers is not None and len(blockers): + if blockers is not None: IssueBlocker.objects.filter(block=instance).delete() IssueBlocker.objects.bulk_create( [ @@ -200,7 +200,7 @@ class IssueCreateSerializer(BaseSerializer): batch_size=10, ) - if assignees is not None and len(assignees): + if assignees is not None: IssueAssignee.objects.filter(issue=instance).delete() IssueAssignee.objects.bulk_create( [ @@ -217,7 +217,7 @@ class IssueCreateSerializer(BaseSerializer): batch_size=10, ) - if labels is not None and len(labels): + if labels is not None: IssueLabel.objects.filter(issue=instance).delete() IssueLabel.objects.bulk_create( [ @@ -234,7 +234,7 @@ class IssueCreateSerializer(BaseSerializer): batch_size=10, ) - if blocks is not None and len(blocks): + if blocks is not None: IssueBlocker.objects.filter(blocked_by=instance).delete() IssueBlocker.objects.bulk_create( [