mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-21 03:15:45 -08:00
Fixed erroneous call to assets.category in filter scope
This commit is contained in:
parent
f43692938b
commit
3695e118f4
|
@ -872,7 +872,7 @@ class Asset extends Depreciable
|
|||
}
|
||||
|
||||
if ($fieldname =='location') {
|
||||
$query->whereHas('defaultLoc', function ($query) use ($search_val) {
|
||||
$query->whereHas('location', function ($query) use ($search_val) {
|
||||
$query->where('locations.name', 'LIKE', '%' . $search_val . '%');
|
||||
});
|
||||
}
|
||||
|
@ -935,8 +935,11 @@ class Asset extends Depreciable
|
|||
}
|
||||
}
|
||||
|
||||
if ($fieldname!='category') {
|
||||
$query->orWhere('assets.'.$fieldname, 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
|
||||
$query->orWhere('assets.'.$fieldname, 'LIKE', '%' . $search_val . '%');
|
||||
|
||||
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue