Fixes #6341. Adding condition that checks offset of licenses seats when the user looks other page than the first. (#6392)

This commit is contained in:
Ivan Nieto 2018-12-05 20:09:54 -06:00 committed by snipe
parent f6c0e7cc9c
commit f91e340178

View file

@ -229,6 +229,11 @@ class LicensesController extends Controller
$offset = request('offset', 0);
$limit = request('limit', 50);
if($seats->count() < $offset){
$offset = 0;
}
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
$total = $seats->count();