lakshmivairamani commited on
Commit
1df1406
·
verified ·
1 Parent(s): f2a297e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -75,7 +75,7 @@ def get_ASN_data(asn_id):
75
  print (data)
76
  response.raise_for_status() # Raises an HTTPError if the response was an error
77
 
78
- if data['result']['content'] != "":
79
  # Assuming the first content item and first party item are what we're interested in
80
  content = data['result']['content'][0]
81
  trnHeaderAsn = content['trnHeaderAsn']
 
75
  print (data)
76
  response.raise_for_status() # Raises an HTTPError if the response was an error
77
 
78
+ if 'result' in data and 'content' in data['result'] and data['result']['content']:
79
  # Assuming the first content item and first party item are what we're interested in
80
  content = data['result']['content'][0]
81
  trnHeaderAsn = content['trnHeaderAsn']