RB-17457 - Object of class Illuminate\Database\Eloquent\Collection could not be converted to int

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2023-11-03 14:06:27 +00:00
parent 4d65d09306
commit 7a638e4a65

View file

@ -666,10 +666,11 @@ class AssetsController extends Controller
$request->offsetSet('image', $request->offsetGet('image_source'));
}
$asset = $request->handleImages($asset);
$asset = $request->handleImages($asset);
$model = AssetModel::find($asset->model_id);
// Update custom fields
if (($model = AssetModel::find($asset->model_id)) && (isset($model->fieldset))) {
if (($model) && (isset($model->fieldset))) {
foreach ($model->fieldset->fields as $field) {
if ($request->has($field->db_column)) {
if ($field->field_encrypted == '1') {