mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-21 03:15:45 -08:00
Merge pull request #13342 from Loemnk/develop
Fixes #13341: Clean up correct seats on license delete
This commit is contained in:
commit
917005ceb4
|
@ -207,7 +207,7 @@ class LicensesController extends Controller
|
||||||
if ($license->assigned_seats_count == 0) {
|
if ($license->assigned_seats_count == 0) {
|
||||||
// Delete the license and the associated license seats
|
// Delete the license and the associated license seats
|
||||||
DB::table('license_seats')
|
DB::table('license_seats')
|
||||||
->where('id', $license->id)
|
->where('license_id', $license->id)
|
||||||
->update(['assigned_to' => null, 'asset_id' => null]);
|
->update(['assigned_to' => null, 'asset_id' => null]);
|
||||||
|
|
||||||
$licenseSeats = $license->licenseseats();
|
$licenseSeats = $license->licenseseats();
|
||||||
|
|
Loading…
Reference in a new issue