fixing customfields bits on store function in AssetsController

This commit is contained in:
akemidx 2024-07-11 15:56:57 -04:00
parent d58c179991
commit 2412db5051

View file

@ -162,8 +162,8 @@ class AssetsController extends Controller
// Validation for these fields is handled through the AssetRequest form request
$model = AssetModel::find($request->get('model_id'));
if (($asset->model->fieldset)) {
foreach ($asset->model->fieldset->fields as $field) {
if (($model) && ($model->fieldset)) {
foreach ($model->fieldset->fields as $field) {
if ($field->field_encrypted == '1') {
if (Gate::allows('admin')) {
if (is_array($request->input($field->db_column))) {
@ -894,6 +894,7 @@ class AssetsController extends Controller
$asset->location_id = $request->input('location_id');
}
/**
* Invoke Watson Validating to check the asset itself and check to make sure it saved correctly.
* We have to invoke this manually because of the unsetEventDispatcher() above.)