API pro podporu vytvareni letu z planu
This commit is contained in:
@@ -52,9 +52,18 @@ class FlightPlanMutationResolver(BaseMutationResolver):
|
||||
position = 0
|
||||
|
||||
for marker in markers:
|
||||
|
||||
if marker.type == 'poi':
|
||||
assert bool(marker.point_of_interest_id)
|
||||
|
||||
if marker.type == 'airport':
|
||||
assert bool(marker.airport_id)
|
||||
|
||||
await models.FlightPlanMarker.create(db, data={
|
||||
"position": position,
|
||||
"flight_plan_id": flight_plan.id,
|
||||
"airport_id": marker.airport_id,
|
||||
"point_of_interest_id": marker.point_of_interest_id,
|
||||
"type": marker.type,
|
||||
"name": marker.name,
|
||||
"gps_latitude": marker.gps_latitude,
|
||||
|
||||
Reference in New Issue
Block a user