mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-25 20:51:30 -08:00
Convert value of the customfield element from string to boolean
This commit is contained in:
parent
c817daa4da
commit
e104195796
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue