Convert value of the customfield element from string to boolean

This commit is contained in:
Ivan Nieto Vivanco 2022-03-09 18:49:39 -06:00
parent c817daa4da
commit e104195796

View file

@ -199,6 +199,12 @@ class Asset extends Depreciable
}
}
foreach ($this->model->fieldset->fields as $field){
if($field->format == 'BOOLEAN'){
$this->{$field->db_column} = filter_var($this->{$field->db_column}, FILTER_VALIDATE_BOOLEAN);
}
}
return parent::save($params);
}