mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-10 07:34:06 -08:00
get rid of nice nullsafe
This commit is contained in:
parent
afe6fe207a
commit
ea61f634fb
|
@ -215,8 +215,8 @@ class BulkAssetsController extends Controller
|
||||||
if($custom_fields_present) {
|
if($custom_fields_present) {
|
||||||
$asset = Asset::find($assetId);
|
$asset = Asset::find($assetId);
|
||||||
$assetCustomFields = $asset->model()->first()->fieldset;
|
$assetCustomFields = $asset->model()->first()->fieldset;
|
||||||
if($assetCustomFields?->fields) {
|
if($assetCustomFields && $assetCustomFields->fields) {
|
||||||
foreach ($assetCustomFields?->fields as $field) {
|
foreach ($assetCustomFields->fields as $field) {
|
||||||
if (array_key_exists($field->db_column, $this->update_array)) {
|
if (array_key_exists($field->db_column, $this->update_array)) {
|
||||||
$asset->{$field->db_column} = $this->update_array[$field->db_column];
|
$asset->{$field->db_column} = $this->update_array[$field->db_column];
|
||||||
$saved = $asset->save();
|
$saved = $asset->save();
|
||||||
|
|
Loading…
Reference in a new issue