get rid of nice nullsafe

This commit is contained in:
slong753 2023-06-28 16:48:52 -05:00
parent afe6fe207a
commit ea61f634fb

View file

@ -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();