WoothAmwar commited on
Commit
fa0b340
·
verified ·
1 Parent(s): f3856d3

Added update to global token in get_flight_offers

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -93,6 +93,8 @@ def get_flight_offers(departure_year: int, departure_month: int, departure_day:
93
  Returns:
94
  dict: A JSON dictionary containing the flight offers and information about them.
95
  """
 
 
96
 
97
  if not GLOBAL_TOKEN:
98
  print("Cannot get flight offers without a valid access token.")
 
93
  Returns:
94
  dict: A JSON dictionary containing the flight offers and information about them.
95
  """
96
+ global GLOBAL_TOKEN
97
+ GLOBAL_TOKEN = get_access_token()
98
 
99
  if not GLOBAL_TOKEN:
100
  print("Cannot get flight offers without a valid access token.")