mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Fixes #13341 Clean up correct seats on license delete
Before this, we checked for the `id` collumn in the `license_seats` table, insteasd of using `license_id` for this. This way, we ensure that we only alter seats belonging to the correct license.
This commit is contained in:
parent
a19a508a80
commit
90a344af0b
|
@ -207,7 +207,7 @@ class LicensesController extends Controller
|
|||
if ($license->assigned_seats_count == 0) {
|
||||
// Delete the license and the associated license seats
|
||||
DB::table('license_seats')
|
||||
->where('id', $license->id)
|
||||
->where('license_id', $license->id)
|
||||
->update(['assigned_to' => null, 'asset_id' => null]);
|
||||
|
||||
$licenseSeats = $license->licenseseats();
|
||||
|
|
Loading…
Reference in a new issue