Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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']
|