Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
snipe committed Jul 8, 2024
2 parents 8eb68d3 + ac9df2f commit c16db43
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions app/Http/Controllers/Assets/AssetsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -905,26 +905,7 @@ public function auditStore(UploadFileRequest $request, $id)
if ($request->input('update_location') == '1') {
$asset->location_id = $request->input('location_id');
}

if (($asset->model->fieldset)) {
foreach ($asset->model->fieldset->fields as $field) {
if ($field->field_encrypted == '1') {
if (Gate::allows('admin')) {
if (is_array($request->input($field->db_column))) {
$asset->{$field->db_column} = Crypt::encrypt(implode(', ', $request->input($field->db_column)));
} else {
$asset->{$field->db_column} = Crypt::encrypt($request->input($field->db_column));
}
}
} else {
if (is_array($request->input($field->db_column))) {
$asset->{$field->db_column} = implode(', ', $request->input($field->db_column));
} else {
$asset->{$field->db_column} = $request->input($field->db_column);
}
}
}
}


/**
* Invoke Watson Validating to check the asset itself and check to make sure it saved correctly.
Expand Down

0 comments on commit c16db43

Please sign in to comment.