From 89d433b41aa0de862cb60142c8d6ef80f339a958 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 9 Jul 2020 20:26:02 -0700 Subject: [PATCH] Removed duplicate seat call --- app/Console/Commands/CheckoutLicenseToAllUsers.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/Console/Commands/CheckoutLicenseToAllUsers.php b/app/Console/Commands/CheckoutLicenseToAllUsers.php index f87a9cfa2875..bf8941233b97 100644 --- a/app/Console/Commands/CheckoutLicenseToAllUsers.php +++ b/app/Console/Commands/CheckoutLicenseToAllUsers.php @@ -75,11 +75,8 @@ public function handle() } // Get the seat ID - $next = $license->freeSeat(); - if (!$licenseSeat = LicenseSeat::where('id', '=', $next->id)->first()) { - $this->error('ERROR: No available seats'); - return false; - } + $licenseSeat = $license->freeSeat(); + // Update the seat with checkout info, $licenseSeat->assigned_to = $user->id;