@@ -168,6 +168,7 @@ def add_new_flight(itinerary_list, itinerary_name, new_flights):
168168 else :
169169 print (f"Duplicate flight detected: { flight ["flight name" ]} !" )
170170 print ("This flight will not be added." )
171+ return False
171172 save_itineraries (itinerary_list )
172173 # Uncomment to print for itinerary_list validation:
173174 # print(itinerary_list)
@@ -183,6 +184,7 @@ def add_new_attraction(itinerary_list, itinerary_name, new_attractions):
183184 else :
184185 print (f"Duplicate attraction detected: { attraction ["attraction name" ]} !" )
185186 print ("This attraction will not be added." )
187+ return False
186188 save_itineraries (itinerary_list )
187189 # Uncomment to print for itinerary_list validation:
188190 # print(itinerary_list)
@@ -239,12 +241,12 @@ def print_table(trips):
239241 trip_table = Table (title = "Itineraries" , show_lines = True )
240242
241243 trip_table .add_column ("Trip Name" , justify = "center" , no_wrap = True )
242- trip_table .add_column ("Location" , justify = "center" )
243- trip_table .add_column ("Description" , justify = "center" )
244+ trip_table .add_column ("Location" , justify = "center" , no_wrap = True )
245+ trip_table .add_column ("Description" , justify = "center" , no_wrap = False )
244246 trip_table .add_column ("Start Date" , justify = "center" , no_wrap = True )
245247 trip_table .add_column ("End Date" , justify = "center" , no_wrap = True )
246248 trip_table .add_column ("Flights" , justify = "left" , no_wrap = True )
247- trip_table .add_column ("Attractions" , justify = "left" , style = "bold" )
249+ trip_table .add_column ("Attractions" , justify = "left" , style = "bold" , no_wrap = False )
248250
249251 for trip in trips :
250252 flight_list = ''
0 commit comments