mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Fixes #2875 - use leftJoin so as to not filter out unassigned assets when sorting by assigned
This commit is contained in:
parent
369715b7c7
commit
cbabcb9197
|
@ -870,7 +870,7 @@ public function checkin_email()
|
|||
*/
|
||||
public function scopeOrderAssigned($query, $order)
|
||||
{
|
||||
return $query->join('users', 'assets.assigned_to', '=', 'users.id')->orderBy('users.first_name', $order)->orderBy('users.last_name', $order);
|
||||
return $query->leftJoin('users', 'assets.assigned_to', '=', 'users.id')->select('assets.*')->orderBy('users.first_name', $order)->orderBy('users.last_name', $order);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue