Hydra: Allow all builds to be restarted.

This commit is contained in:
Rob Vermaas 2010-05-26 08:03:44 +00:00
parent 75bb591c03
commit 9c42f60f08

View file

@ -354,10 +354,7 @@ sub restart : Chained('build') PathPart Args(0) {
txn_do($c->model('DB')->schema, sub { txn_do($c->model('DB')->schema, sub {
error($c, "This build cannot be restarted.") error($c, "This build cannot be restarted.")
unless $build->finished && unless $build->finished;
($build->resultInfo->buildstatus == 2 ||
$build->resultInfo->buildstatus == 3 ||
$build->resultInfo->buildstatus == 4);
$build->update({finished => 0, timestamp => time}); $build->update({finished => 0, timestamp => time});