diff --git a/app/Importer/LicenseImporter.php b/app/Importer/LicenseImporter.php index 894c50bbfa..3bfbf1ee26 100644 --- a/app/Importer/LicenseImporter.php +++ b/app/Importer/LicenseImporter.php @@ -80,6 +80,11 @@ class LicenseImporter extends ItemImporter $checkout_target = $this->item['checkout_target']; $asset = Asset::where('asset_tag', $asset_tag)->first(); $targetLicense = $license->freeSeat(); + + if (is_null($targetLicense)){ + return; + } + if ($checkout_target) { $targetLicense->assigned_to = $checkout_target->id; $targetLicense->user_id = Auth::id();