mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-13 17:14:10 -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
|
// a comma-separated string but if we're loading the page
|
||||||
// with old input then it was already parsed into an array.
|
// with old input then it was already parsed into an array.
|
||||||
if ($field->element === 'checkbox' && is_string($defaultValue)) {
|
if ($field->element === 'checkbox' && is_string($defaultValue)) {
|
||||||
$this->selectedValues[$field->db_column] = explode(', ', $defaultValue);
|
$defaultValue = explode(', ', $defaultValue);
|
||||||
} else {
|
}
|
||||||
|
|
||||||
$this->selectedValues[$field->db_column] = $defaultValue;
|
$this->selectedValues[$field->db_column] = $defaultValue;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue