chore: Update ServerLimitCheckJob.php to handle missing serverLimit value

This commit is contained in:
Andras Bacsai 2024-05-15 11:44:42 +02:00
parent 1d9d6c899d
commit b9a755d6d3

View File

@ -40,7 +40,7 @@ public function handle()
try {
$servers = $this->team->servers;
$servers_count = $servers->count();
$limit = $this->team->limits['serverLimit'];
$limit = data_get($this->team->limits, 'serverLimit', 2);
$number_of_servers_to_disable = $servers_count - $limit;
ray('ServerLimitCheckJob', $this->team->uuid, $servers_count, $limit, $number_of_servers_to_disable);
if ($number_of_servers_to_disable > 0) {