mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
Fix null test plan database error
Summary: Some Differential fields are not nullable; when Test Plan is switched to non-required mode we can end up trying to save a null value to a non-nullable column (see D2193). (I should probably just alter the schema to make these fields nullable, but that might have farther-reaching effects.) Test Plan: Reproduced error, applied patch, no more error. Reviewers: btrahan, vrana, jungejason Reviewed By: btrahan CC: aran Differential Revision: https://secure.phabricator.com/D2200
This commit is contained in:
parent
28dfeeb5d5
commit
2360504462
1 changed files with 3 additions and 3 deletions
|
@ -19,7 +19,7 @@
|
|||
final class DifferentialTestPlanFieldSpecification
|
||||
extends DifferentialFieldSpecification {
|
||||
|
||||
private $plan;
|
||||
private $plan = '';
|
||||
|
||||
// NOTE: This means "uninitialized".
|
||||
private $error = false;
|
||||
|
@ -29,7 +29,7 @@ final class DifferentialTestPlanFieldSpecification
|
|||
}
|
||||
|
||||
protected function didSetRevision() {
|
||||
$this->plan = $this->getRevision()->getTestPlan();
|
||||
$this->plan = (string)$this->getRevision()->getTestPlan();
|
||||
}
|
||||
|
||||
public function setValueFromRequest(AphrontRequest $request) {
|
||||
|
@ -77,7 +77,7 @@ final class DifferentialTestPlanFieldSpecification
|
|||
}
|
||||
|
||||
public function setValueFromParsedCommitMessage($value) {
|
||||
$this->plan = $value;
|
||||
$this->plan = (string)$value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue