Fix bug in reserve freqs & tacan

This commit is contained in:
Raffson 2023-09-17 14:13:20 +02:00
parent 59871ac36c
commit 167d048232
No known key found for this signature in database
GPG Key ID: B0402B2C9B764D99

View File

@ -282,10 +282,9 @@ class AircraftGenerator:
def _reserve_frequencies_and_tacan(self, ato: AirTaskingOrder) -> None:
for package in ato.packages:
if package.frequency is None:
continue
if package.frequency not in self.radio_registry.allocated_channels:
self.radio_registry.reserve(package.frequency)
pfreq = package.frequency
if pfreq and pfreq not in self.radio_registry.allocated_channels:
self.radio_registry.reserve(pfreq)
for f in package.flights:
if (
f.frequency