Fix delete attachment check (#36320) (#36355)

Backport #36320
This commit is contained in:
Lunny Xiao
2026-01-12 13:48:07 -08:00
committed by GitHub
parent 2c778ff067
commit 11891c2dac
3 changed files with 88 additions and 8 deletions

View File

@@ -398,7 +398,6 @@ func DeleteReleaseAttachment(ctx *context.APIContext) {
ctx.APIErrorNotFound()
return
}
// FIXME Should prove the existence of the given repo, but results in unnecessary database requests
if err := repo_model.DeleteAttachment(ctx, attach, true); err != nil {
ctx.APIErrorInternal(err)