Skip to content

Commit 3882575

Browse files
MNT: wrap initial_liquid_mass and initial_gas_mass with _to_float
Consistent with all other tank-kind fields — these attributes can be Function objects in RocketPy, so they need the same scalar extraction to avoid Pydantic validation failures. Made-with: Cursor
1 parent 525fa96 commit 3882575

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/services/flight.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,8 @@ def _extract_tanks(motor) -> list[MotorTank]:
283283
"liquid_mass_flow_rate_out": _f(
284284
tank.liquid_mass_flow_rate_out
285285
),
286-
"initial_liquid_mass": (tank.initial_liquid_mass),
287-
"initial_gas_mass": (tank.initial_gas_mass),
286+
"initial_liquid_mass": _f(tank.initial_liquid_mass),
287+
"initial_gas_mass": _f(tank.initial_gas_mass),
288288
}
289289
case TankKinds.ULLAGE:
290290
data["ullage"] = _f(tank.ullage)

0 commit comments

Comments
 (0)