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:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user