Convert empty string values to NULL, relations cannot be ''

This commit is contained in:
Sam Georges 2014-05-28 13:00:31 +10:00
parent 6aaf4cce43
commit bfaa55df31
1 changed files with 7 additions and 0 deletions

View File

@ -116,4 +116,11 @@ class Relation extends FormWidgetBase
return $this->renderFormField = $field;
}
/**
* {@inheritDoc}
*/
public function getSaveData($value)
{
return strlen($value) ? $value : null;
}
}