diff --git a/app/Services/SquawkService.php b/app/Services/SquawkService.php index ba1696fe4..289c7caf6 100644 --- a/app/Services/SquawkService.php +++ b/app/Services/SquawkService.php @@ -140,7 +140,8 @@ public function assignGeneralSquawk(string $callsign, string $origin, string $de if ($ranges && $ranges->isNotEmpty()) { foreach ($ranges as $generalSquawkRanges) { - foreach ($generalSquawkRanges->ranges as $possibleRange) { + $possibleRanges = $generalSquawkRanges->ranges->shuffle(); + foreach ($possibleRanges as $possibleRange) { // Check the applicable ranges for a squawk and see if we can find one. $squawk = $this->searchForSquawkInRange($possibleRange); if ($squawk !== false) {