File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -249,7 +249,7 @@ func ViewPost(ctx *context_module.Context) {
249249 ID : v .ID ,
250250 Name : v .Name ,
251251 Status : v .Status .String (),
252- CanRerun : v . Status . IsDone () && ctx . Repo . CanWrite ( unit . TypeActions ) ,
252+ CanRerun : resp . State . Run . CanRerun ,
253253 Duration : v .Duration ().String (),
254254 })
255255 }
@@ -445,7 +445,7 @@ func Rerun(ctx *context_module.Context) {
445445 return
446446 }
447447 }
448- ctx .JSON ( http . StatusOK , struct {}{} )
448+ ctx .JSONOK ( )
449449 return
450450 }
451451
@@ -460,12 +460,12 @@ func Rerun(ctx *context_module.Context) {
460460 }
461461 }
462462
463- ctx .JSON ( http . StatusOK , struct {}{} )
463+ ctx .JSONOK ( )
464464}
465465
466466func rerunJob (ctx * context_module.Context , job * actions_model.ActionRunJob , shouldBlock bool ) error {
467467 status := job .Status
468- if ! status .IsDone () {
468+ if ! status .IsDone () || ! job . Run . Status . IsDone () {
469469 return nil
470470 }
471471
You can’t perform that action at this time.
0 commit comments