From cc7b34e399ac41dc3a173780c5eaa96915554242 Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Date: Fri, 21 Feb 2025 00:10:16 +0530 Subject: [PATCH] [WEB-3439] fix: work item attachment mutation (#6655) * chore: created by field added to attachment response * fix: work item attachment mutation --- apiserver/plane/app/serializers/issue.py | 1 + web/core/store/issue/issue-details/attachment.store.ts | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/apiserver/plane/app/serializers/issue.py b/apiserver/plane/app/serializers/issue.py index a62b266e9..2fb7c035d 100644 --- a/apiserver/plane/app/serializers/issue.py +++ b/apiserver/plane/app/serializers/issue.py @@ -522,6 +522,7 @@ class IssueAttachmentLiteSerializer(DynamicBaseSerializer): "asset", "attributes", # "issue_id", + "created_by", "updated_at", "updated_by", "asset_url", diff --git a/web/core/store/issue/issue-details/attachment.store.ts b/web/core/store/issue/issue-details/attachment.store.ts index 6f4977dbb..73474a3e8 100644 --- a/web/core/store/issue/issue-details/attachment.store.ts +++ b/web/core/store/issue/issue-details/attachment.store.ts @@ -161,9 +161,6 @@ export class IssueAttachmentStore implements IIssueAttachmentStore { runInAction(() => { update(this.attachments, [issueId], (attachmentIds = []) => uniq(concat(attachmentIds, [response.id]))); set(this.attachmentMap, response.id, response); - this.rootIssueStore.issues.updateIssue(issueId, { - attachment_count: issueAttachmentsCount + 1, // increment attachment count - }); }); }