empty sort now reverts to default instead of 503

This commit is contained in:
2023-05-20 19:24:28 +10:00
parent 11eb12324e
commit 16f4eb65ef

View File

@@ -242,7 +242,14 @@ class Conductor
});
// Sort request
$conductor->sort($request->input('sort', $conductor->sort));
$sort = $request->input('sort', $conductor->sort);
if (strlen($sort) === 0) {
if (strlen($conductor->sort) > 0) {
$conductor->sort($conductor->sort);
}
} else {
$conductor->sort($sort);
}
// Get total
$total = $conductor->count();