Reset the status of a duplicated build to avoid strict-mode errors.

When using SQL strict mode, mysql would complain that no default value of the status column is set. Setting the status to 0 before duplicating fixes this.

Closes #725
This commit is contained in:
Daniel Seif 2015-01-05 00:53:40 +01:00 committed by Dan Cryer
parent 353c4cafdb
commit e531c80718

View file

@ -100,6 +100,7 @@ class BuildService
$build = new Build();
$build->setValues($data);
$build->setCreated(new \DateTime());
$build->setStatus(0);
return $this->buildStore->save($build);
}