Move FlightJs out of MapModel.

This commit is contained in:
Dan Albert
2022-02-22 20:40:58 -08:00
parent ad0d3412fb
commit 45e76e12b6
18 changed files with 333 additions and 326 deletions

View File

@@ -129,6 +129,9 @@ class Package:
"""Removes a flight from the package."""
self.flights.remove(flight)
self._db.remove(flight.id)
flight.return_pilots_and_aircraft()
if flight.cargo is not None:
flight.cargo.transport = None
if not self.flights:
self.waypoints = None