Fix numeric sort 'ambiguous order clause' error

This commit is contained in:
Brady Wetherington 2024-10-03 14:23:40 +01:00
parent 54fbd0540d
commit 350b627ce1

View file

@ -395,7 +395,7 @@ class AssetsController extends Controller
// This may not work for all databases, but it works for MySQL
if ($numeric_sort) {
$assets->orderByRaw($sort_override . ' * 1 ' . $order);
$assets->orderByRaw(DB::getTablePrefix() . 'assets.' . $sort_override . ' * 1 ' . $order);
} else {
$assets->orderBy($sort_override, $order);
}