mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
fix false search in api.
This commit is contained in:
parent
976957ddd4
commit
4cfc4aec1d
|
@ -79,10 +79,14 @@ class LicensesController extends Controller
|
||||||
|
|
||||||
if (($request->filled('maintained')) && ($request->input('maintained')=='true')) {
|
if (($request->filled('maintained')) && ($request->input('maintained')=='true')) {
|
||||||
$licenses->where('maintained','=',1);
|
$licenses->where('maintained','=',1);
|
||||||
|
} elseif (($request->filled('maintained')) && ($request->input('maintained')=='false')) {
|
||||||
|
$licenses->where('maintained','=',0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($request->filled('expires')) && ($request->input('expires')=='true')) {
|
if (($request->filled('expires')) && ($request->input('expires')=='true')) {
|
||||||
$licenses->whereNotNull('expiration_date');
|
$licenses->whereNotNull('expiration_date');
|
||||||
|
} elseif (($request->filled('expires')) && ($request->input('expires')=='false')) {
|
||||||
|
$licenses->whereNull('expiration_date');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($request->filled('search')) {
|
if ($request->filled('search')) {
|
||||||
|
|
Loading…
Reference in a new issue