mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Check ctx.Written()
for GetActionIssue
(#25698)
Fix #25697. Just avoid panic, maybe there's another bug to trigger this case. --------- Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
@@ -15,6 +15,9 @@ import (
|
||||
// IssuePinOrUnpin pin or unpin a Issue
|
||||
func IssuePinOrUnpin(ctx *context.Context) {
|
||||
issue := GetActionIssue(ctx)
|
||||
if ctx.Written() {
|
||||
return
|
||||
}
|
||||
|
||||
// If we don't do this, it will crash when trying to add the pin event to the comment history
|
||||
err := issue.LoadRepo(ctx)
|
||||
|
Reference in New Issue
Block a user