1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Fix 500 error when state params is set when editing issue/PR by API (#31880)

A quick fix for #31871
This commit is contained in:
yp05327
2024-09-02 03:08:27 +09:00
committed by GitHub
parent 661a1e10f7
commit eba6bfbe15
3 changed files with 41 additions and 10 deletions

View File

@@ -13,6 +13,9 @@ import (
)
// ChangeStatus changes issue status to open or closed.
// closed means the target status
// Fix me: you should check whether the current issue status is same to the target status before call this function
// as in function changeIssueStatus we will return WasClosedError, even the issue status and target status are both open
func ChangeStatus(ctx context.Context, issue *issues_model.Issue, doer *user_model.User, commitID string, closed bool) error {
comment, err := issues_model.ChangeIssueStatus(ctx, issue, doer, closed)
if err != nil {