File tree 2 files changed +3
-4
lines changed 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -195,9 +195,7 @@ async def get_rocketpy_flight_as_jsonpickle(
195
195
detail = "Failed to read flight: {e}" ,
196
196
) from e
197
197
else :
198
- rocketpy_flight = await cls .get_rocketpy_flight (
199
- read_flight
200
- )
198
+ rocketpy_flight = await cls .get_rocketpy_flight (read_flight )
201
199
return FlightPickle (
202
200
jsonpickle_rocketpy_flight = jsonpickle .encode (rocketpy_flight )
203
201
)
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ def __del__(self):
29
29
super ().__del__ ()
30
30
31
31
async def create_rocket (
32
- self , rocket_option : str = "Calisto"
32
+ self , rocket_option : str = "Calisto" , motor_kind : str = "Solid"
33
33
) -> "InsertOneResult" :
34
34
"""
35
35
Creates a rocket in the database
@@ -45,6 +45,7 @@ async def create_rocket(
45
45
rocket_to_dict = self .rocket .dict ()
46
46
rocket_to_dict ["rocket_id" ] = self .rocket_id
47
47
rocket_to_dict ["rocket_option" ] = rocket_option
48
+ rocket_to_dict ["motor" ]["motor_kind" ] = motor_kind
48
49
return await self .collection .insert_one (rocket_to_dict )
49
50
except Exception as e :
50
51
raise Exception (f"Error creating rocket: { str (e )} " ) from e
You can’t perform that action at this time.
0 commit comments