mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Merge pull request #14101 from marcusmoore/bug/sc-24398
Fixes creating invalid query with null values
This commit is contained in:
commit
dbcf7e3fd1
|
@ -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()));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue