Merge pull request #1 from roll4life/feature/uuid

refs #8027 combine if statements
This commit is contained in:
Jorge M. González Martín 2016-02-11 12:19:27 +00:00
commit 19fc6adbb3

View file

@ -934,10 +934,8 @@ class Postgres extends DboSource {
*/
public function value($data, $column = null, $null = true) {
$value = parent::value($data, $column, $null);
if ($column === 'uuid' && is_scalar($data)) {
if ($data === '') {
return 'NULL';
}
if ($column === 'uuid' && is_scalar($data) && $data === '') {
return 'NULL';
}
return $value;
}