Skip to content

fli multi shows no booking link for open-jaw / multi-city results #212

Description

@drphilth

The flights command attaches a Google Flights tfs deep-link per result; the multi command doesn't, so open-jaw itineraries have no bookable link. build_flight_booking_url already supports multi-city (a tuple of FlightResults, one per direction) — the multi command just never calls it.

--- a/src/fli/cli/commands/multi.py
+++ b/src/fli/cli/commands/multi.py
@@ def multi(...):
         if not results:
             typer.echo("No flights found.")
             raise typer.Exit(1)
-        display_flight_results(results, trip_type=trip_type)
+        # build_flight_booking_url already supports multi-city (a tuple of
+        # FlightResults, one per direction) — the multi command just never
+        # called it, so open-jaw results had no bookable link (unlike `flights`).
+        booking_urls = [
+            search_client.build_flight_booking_url(result) for result in results
+        ]
+        display_flight_results(results, trip_type=trip_type, booking_urls=booking_urls)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions