Skip to content

Commit

Permalink
Merge pull request #14102 from Godmartinz/seat-id-is-zero
Browse files Browse the repository at this point in the history
Fixed license seats id turning to zero when sorting by department
  • Loading branch information
snipe committed Jan 24, 2024
2 parents 684264d + 4373726 commit 7668a67
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/Models/LicenseSeat.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ public function scopeOrderDepartments($query, $order)
{
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);
}
}

0 comments on commit 7668a67

Please sign in to comment.