Omkar008 commited on
Commit
18ceff9
·
verified ·
1 Parent(s): 88206e1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -28,7 +28,10 @@ async def get_user_travel_data(hushh_id:str):
28
  if msg.get('metadata') is not None and msg.get('metadata') != 'null':
29
  ds = json.loads(msg.get('metadata'))
30
  arrival_date = ds.get('arrival_date') or date
31
- travel_type = ds.get('travel_type')
 
 
 
32
  departure_destination = ds.get('departure_destination') if ds.get('departure_destination') is not None else None
33
  arrival_destination = ds.get('arrival_destination') if ds.get('arrival_destination') is not None else None
34
  arrival_city = ds.get('arrival_city') if ds.get('arrival_city') is not None else None
 
28
  if msg.get('metadata') is not None and msg.get('metadata') != 'null':
29
  ds = json.loads(msg.get('metadata'))
30
  arrival_date = ds.get('arrival_date') or date
31
+ travel_type = ds.get('travel_type',None)
32
+ if ds.get('travel_type') == 'null' or travel_type is not None:
33
+ continue
34
+
35
  departure_destination = ds.get('departure_destination') if ds.get('departure_destination') is not None else None
36
  arrival_destination = ds.get('arrival_destination') if ds.get('arrival_destination') is not None else None
37
  arrival_city = ds.get('arrival_city') if ds.get('arrival_city') is not None else None