mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
FIX: commonobject: don't require notnull field if default set
This commit is contained in:
@@ -6278,7 +6278,7 @@ abstract class CommonObject
|
||||
if (! empty($this->fields[$key]['foreignkey']) && $values[$key] == '-1') $values[$key]='';
|
||||
|
||||
//var_dump($key.'-'.$values[$key].'-'.($this->fields[$key]['notnull'] == 1));
|
||||
if ($this->fields[$key]['notnull'] == 1 && ! isset($values[$key]))
|
||||
if ($this->fields[$key]['notnull'] == 1 && ! isset($values[$key]) && is_null($val['default']))
|
||||
{
|
||||
$error++;
|
||||
$this->errors[]=$langs->trans("ErrorFieldRequired", $this->fields[$key]['label']);
|
||||
|
||||
Reference in New Issue
Block a user