fix: Display the most recent ASN Description we know about.

pull/12/head
Raphaël Vinot 2019-03-15 18:11:08 +01:00
parent 35adef8336
commit 7694c119cd
1 changed files with 2 additions and 0 deletions

View File

@ -184,6 +184,8 @@ def ipasn():
for timestamp in sorted(asn_descriptions.keys()): for timestamp in sorted(asn_descriptions.keys()):
if r['first_seen'] <= timestamp <= r['last_seen']: if r['first_seen'] <= timestamp <= r['last_seen']:
r['asn_description'].append(asn_descriptions[timestamp]) r['asn_description'].append(asn_descriptions[timestamp])
if not r['asn_description'] and timestamp <= r['last_seen']:
r['asn_description'].append(asn_descriptions[timestamp])
return render_template('ipasn.html', ipasn_details=response['response'], return render_template('ipasn.html', ipasn_details=response['response'],
**response['meta']) **response['meta'])