mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-03 18:02:28 +02: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:
parent
c0edb9b78b
commit
3c05aa4927
5 changed files with 20 additions and 11 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue