Merge pull request #13342 from Loemnk/develop

Fixes #13341: Clean up correct seats on license delete
This commit is contained in:
snipe 2023-07-20 13:05:31 +01:00 committed by GitHub
commit 917005ceb4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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();