fix POST /{username}/{reponame}/{type:issues|pulls}/move_pin

(cherry picked from commit 7eda733ed6a22c08a85fdc90deec0c440427cef7)
This commit is contained in:
Loïc Dachary 2023-11-20 16:34:19 +01:00
parent 65b942fa1e
commit 2d9d2979e6
No known key found for this signature in database
GPG key ID: 992D23B392F9E4F2

View file

@ -89,6 +89,10 @@ func IssuePinMove(ctx *context.Context) {
log.Error(err.Error()) log.Error(err.Error())
return return
} }
if issue.RepoID != ctx.Repo.Repository.ID {
ctx.NotFound("CompareRepoID", issues_model.ErrCommentNotExist{})
return
}
err = issue.MovePin(ctx, form.Position) err = issue.MovePin(ctx, form.Position)
if err != nil { if err != nil {