fix: issue attachment delete (#759)

This commit is contained in:
pablohashescobar 2023-04-13 00:33:37 +05:30 committed by GitHub
parent 5190ea7280
commit 440ed08728
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -772,6 +772,7 @@ class IssueAttachmentEndpoint(BaseAPIView):
def delete(self, request, slug, project_id, issue_id, pk):
try:
issue_attachment = IssueAttachment.objects.get(pk=pk)
issue_attachment.asset.delete(save=False)
issue_attachment.delete()
issue_activity.delay(
type="attachment.activity.deleted",