Merge pull request #14101 from marcusmoore/bug/sc-24398

Fixes creating invalid query with null values
This commit is contained in:
snipe 2024-01-04 22:36:46 +00:00 committed by GitHub
commit dbcf7e3fd1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -136,7 +136,7 @@ class AssetsController extends Controller
// Search custom fields by column name
foreach ($all_custom_fields as $field) {
if ($request->filled($field->db_column_name())) {
if ($request->filled($field->db_column_name()) && $field->db_column_name()) {
$assets->where($field->db_column_name(), '=', $request->input($field->db_column_name()));
}
}