From 8c8a6d12a7aa340e243b5e46f0ea2c671b347e5c Mon Sep 17 00:00:00 2001 From: GabrielBarberini Date: Sun, 11 Aug 2024 14:27:36 -0300 Subject: [PATCH] fixes get environment call on fight routes and adjusts db name --- lib/controllers/flight.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/controllers/flight.py b/lib/controllers/flight.py index a3905ee..af2b307 100644 --- a/lib/controllers/flight.py +++ b/lib/controllers/flight.py @@ -32,6 +32,7 @@ from lib.repositories.flight import FlightRepository from lib.controllers.environment import EnvController from lib.controllers.rocket import RocketController +from lib.services.environment import EnvironmentService class FlightController: @@ -88,7 +89,7 @@ def get_rocketpy_flight(flight: Flight) -> RocketPyFlight: RocketPyFlight """ rocketpy_rocket = RocketController.get_rocketpy_rocket(flight.rocket) - rocketpy_env = EnvController.get_rocketpy_env(flight.environment) + rocketpy_env = EnvironmentService.from_env_model(flight.environment) rocketpy_flight = RocketPyFlight( rocket=rocketpy_rocket, inclination=flight.inclination,