Skip to content

Commit

Permalink
Merge pull request #14101 from marcusmoore/bug/sc-24398
Browse files Browse the repository at this point in the history
Fixes creating invalid query with null values
  • Loading branch information
snipe committed Jan 4, 2024
2 parents 0c6611d + 742e183 commit dbcf7e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Http/Controllers/Api/AssetsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public function index(Request $request, $audit = null)

// 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()));
}
}
Expand Down

0 comments on commit dbcf7e3

Please sign in to comment.