revert unrelated change

This commit is contained in:
Lunny Xiao 2025-07-26 11:55:43 -07:00
parent 4ff5c97e2e
commit 9671f2e7a7
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A

View File

@ -266,11 +266,6 @@ func UpdateIssueAttachments(ctx context.Context, issueID int64, uuids []string)
return fmt.Errorf("getAttachmentsByUUIDs [uuids: %v]: %w", uuids, err)
}
for i := range attachments {
if attachments[i].IssueID == issueID {
continue
} else if attachments[i].IssueID != 0 {
return util.NewPermissionDeniedErrorf("update issue attachments permission denied")
}
attachments[i].IssueID = issueID
if err := repo_model.UpdateAttachment(ctx, attachments[i]); err != nil {
return fmt.Errorf("update attachment [id: %d]: %w", attachments[i].ID, err)