Fix delete attachment check (#36320)

This commit is contained in:
Lunny Xiao
2026-01-12 00:16:59 -08:00
committed by GitHub
parent 48d5adb39c
commit fbea2c68e8
3 changed files with 83 additions and 8 deletions
@@ -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)