mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Simplify logic
This commit is contained in:
parent
0abb5637e0
commit
68749e7e87
|
@ -68,9 +68,9 @@ class CustomFieldSetDefaultValuesForModel extends Component
|
|||
// a comma-separated string but if we're loading the page
|
||||
// with old input then it was already parsed into an array.
|
||||
if ($field->element === 'checkbox' && is_string($defaultValue)) {
|
||||
$this->selectedValues[$field->db_column] = explode(', ', $defaultValue);
|
||||
} else {
|
||||
$this->selectedValues[$field->db_column] = $defaultValue;
|
||||
$defaultValue = explode(', ', $defaultValue);
|
||||
}
|
||||
|
||||
$this->selectedValues[$field->db_column] = $defaultValue;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue