mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-27 05:31:11 -08:00
Merge pull request #13228 from snipe/bug/sc-23434
Use proper alias for table scope
This commit is contained in:
commit
825e988dfa
|
@ -1566,7 +1566,7 @@ class Asset extends Depreciable
|
|||
*/
|
||||
public function scopeOrderModelNumber($query, $order)
|
||||
{
|
||||
return $query->leftJoin('models as model_number_sort', 'assets.model_id', '=', 'models.id')->orderBy('models.model_number', $order);
|
||||
return $query->leftJoin('models as model_number_sort', 'assets.model_id', '=', 'model_number_sort.id')->orderBy('model_number_sort.model_number', $order);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue