Fixed sort by model in asset listing

This commit is contained in:
snipe 2017-11-16 14:14:30 -08:00
parent ce525c1985
commit 3d07635820

View file

@ -963,7 +963,7 @@ class Asset extends Depreciable
*/
public function scopeOrderModels($query, $order)
{
return $query->join('models as asset_models', 'assets.model_id', '=', 'models.id')->orderBy('models.name', $order);
return $query->join('models as asset_models', 'assets.model_id', '=', 'asset_models.id')->orderBy('asset_models.name', $order);
}
/**