Merge pull request #14102 from Godmartinz/seat-id-is-zero

Fixed license seats id turning to zero when sorting by department
This commit is contained in:
snipe 2024-01-24 14:49:33 +00:00 committed by GitHub
commit 7668a6767d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -126,6 +126,7 @@ class LicenseSeat extends SnipeModel implements ICompanyableChild
{
return $query->leftJoin('users as license_seat_users', 'license_seats.assigned_to', '=', 'license_seat_users.id')
->leftJoin('departments as license_user_dept', 'license_user_dept.id', '=', 'license_seat_users.department_id')
->whereNotNull('license_seats.assigned_to')
->orderBy('license_user_dept.name', $order);
}
}