mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
FIX Can't insert if there is extrafields mandatory on another entity.
FIX Can't set default value of extrafield of type varchar
This commit is contained in:
@@ -1138,7 +1138,7 @@ class DoliDBPgsql extends DoliDB
|
||||
if ($field_desc['default'] != '')
|
||||
{
|
||||
if ($field_desc['type'] == 'double' || $field_desc['type'] == 'tinyint' || $field_desc['type'] == 'int') $sql.=" DEFAULT ".$this->escape($field_desc['default']);
|
||||
elseif ($field_desc['type'] == 'text') $sql.=" DEFAULT '".$this->escape($field_desc['default'])."'"; // Default not supported on text fields
|
||||
elseif ($field_desc['type'] != 'text') $sql.=" DEFAULT '".$this->escape($field_desc['default'])."'"; // Default not supported on text fields
|
||||
}
|
||||
|
||||
dol_syslog($sql,LOG_DEBUG);
|
||||
|
||||
Reference in New Issue
Block a user