Skip to content

Commit

Permalink
Merge pull request #10514 from uberbrady/fix_double_wildcard_query_re…
Browse files Browse the repository at this point in the history
…questable

Fixed extraneous wildcard query in requestable asset search
  • Loading branch information
snipe authored Jan 14, 2022
2 parents 591e1c6 + 65e584c commit 207ff01
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/Http/Controllers/Api/AssetsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,9 @@ public function requestable(Request $request)
$offset = request('offset', 0);
$limit = $request->input('limit', 50);
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
$assets->TextSearch($request->input('search'));
if ($request->filled('search')) {
$assets->TextSearch($request->input('search'));
}

switch ($request->input('sort')) {
case 'model':
Expand Down

0 comments on commit 207ff01

Please sign in to comment.