@@ -196,7 +196,7 @@ def _serialize_flight_segment_result(flight: Any, *, include_price: bool = False
196196 }
197197 if include_price :
198198 payload ["price" ] = flight .price
199- payload ["currency" ] = DEFAULT_CURRENCY
199+ payload ["currency" ] = flight . currency or DEFAULT_CURRENCY
200200 return payload
201201
202202
@@ -206,7 +206,7 @@ def serialize_flight_result(flight_data: Any) -> dict[str, Any]:
206206 outbound , return_flight = flight_data
207207 return {
208208 "price" : outbound .price ,
209- "currency" : DEFAULT_CURRENCY ,
209+ "currency" : outbound . currency or DEFAULT_CURRENCY ,
210210 "duration" : outbound .duration + return_flight .duration ,
211211 "stops" : outbound .stops + return_flight .stops ,
212212 "outbound" : _serialize_flight_segment_result (outbound ),
@@ -222,7 +222,7 @@ def serialize_date_result(date_result: Any, trip_type: TripType) -> dict[str, An
222222 "departure_date" : date_result .date [0 ].date ().isoformat (),
223223 "return_date" : None ,
224224 "price" : date_result .price ,
225- "currency" : DEFAULT_CURRENCY ,
225+ "currency" : date_result . currency or DEFAULT_CURRENCY ,
226226 }
227227 if trip_type == TripType .ROUND_TRIP and len (date_result .date ) > 1 :
228228 payload ["return_date" ] = date_result .date [1 ].date ().isoformat ()
0 commit comments