Skip to content

[BUG] New flight objects define their subclass object ids as null #53

Description

@aasitvora99

Describe the bug

Note

Not sure if this is by design, I raised as it seemed odd.

While creating new flight objects with POST /flights route, rocket_id and motor_id that get passed as strings get subbed with null while fetching the new object.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new flight object
    2.Run a GET /flight for the new flight object id received from 1
  2. Check response body field, rocket_id and motor_id is defined null

Expected behavior
RFC. Is this by design?

Request Body

curl -X 'POST' \
'http://localhost:8080/flights/' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{ "name": "Flight", "environment": { "latitude": 0, "longitude": 0, "elevation": 1400, "atmospheric_model_type": "standard_atmosphere", "atmospheric_model_file": "GFS", "date": "2025-07-13T14:04:02.841000" }, "rocket": { "motor": { "thrust_source": [ [ 0.082, 2651.855 ], [ 0.249, 2780.285 ] ], "burn_time": 4.264, "nozzle_radius": 0.1, "dry_mass": 3.4048, "dry_inertia": [ 0, 0, 0 ], "center_of_dry_mass_position": 0.1, "motor_kind": "GENERIC", "chamber_radius": 0.049, "chamber_height": 0.751, "chamber_position": 0, "propellant_initial_mass": 8.064, "nozzle_position": 0, "tanks": null, "grain_number": null, "grain_density": null, "grain_outer_radius": null, "grain_initial_inner_radius": null, "grain_initial_height": null, "grains_center_of_mass_position": null, "grain_separation": null, "throat_radius": null, "interpolation_method": "linear", "coordinate_system_orientation": "nozzle_to_combustion_chamber", "reshape_thrust_curve": false, "motor_id":"6872bc56d9d1ad60bef48dc2" }, "radius": 0.1, "mass": 26, "motor_position": -0.06, "center_of_mass_without_motor": 0, "inertia": [ 0, 0, 0 ], "power_off_drag": [ [ 0, 0 ], [ 0.1, 0.1 ], [ 0.2, 0.2 ] ], "power_on_drag": [ [ 0, 0 ], [ 0.1, 0.1 ], [ 0.2, 0.2 ] ], "coordinate_system_orientation": "tail_to_nose", "nose": { "name": "Nose", "length": 2, "kind": "vonKarman", "position": 1, "base_radius": 0.1, "rocket_radius": 0.1 }, "fins": [ { "fins_kind": "trapezoidal", "name": "Fins", "n": 4, "root_chord": 0.25, "span": 0.15, "position": -0.5, "tip_chord": 0.15, "cant_angle": 0, "rocket_radius": 0.1, "airfoil": null } ], "parachutes": null, "rail_buttons": { "name": "RailButtons", "upper_button_position": 0.1, "lower_button_position": -0.1, "angular_position": 0 }, "tail": null, "rocket_id":"6872bc56d9d1ad60bef48dc9" }, "rail_length": 6, "time_overshoot": true, "terminate_on_apogee": false, "equations_of_motion": "standard", "inclination": 85, "heading": 0, "max_time": null, "max_time_step": null, "min_time_step": null, "rtol": null, "atol": null, "verbose": null }'

Metadata

Metadata

Labels

bugSomething isn't workingquestionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions