From aeb90e6c5f0076eedf948402a0c6d5e3dbee15e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Fri, 15 Mar 2019 18:20:52 +0100 Subject: [PATCH] fix: Bad call to get_asn_descriptions, typo. --- website/web/__init__.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/website/web/__init__.py b/website/web/__init__.py index 53be1fc..91c1ab8 100644 --- a/website/web/__init__.py +++ b/website/web/__init__.py @@ -179,13 +179,14 @@ def ipasn(): response = ipasn.query(first=(date.today() - timedelta(days=60)).isoformat(), aggregate=True, ip=ip) for r in response['response']: - r['asn_description'] = [] - asn_descriptions = q.get_asn_descriptions(asn=r['asn'], all_descriptions=True) + r['asn_descriptions'] = [] + asn_descriptions = q.get_asn_descriptions(asn=r['asn'], all_descriptions=True)['response'] for timestamp in sorted(asn_descriptions.keys()): if r['first_seen'] <= timestamp <= r['last_seen']: - r['asn_description'].append(asn_descriptions[timestamp]) - if not r['asn_description'] and timestamp <= r['last_seen']: - r['asn_description'].append(asn_descriptions[timestamp]) + r['asn_descriptions'].append(asn_descriptions[timestamp]) + + if not r['asn_descriptions'] and timestamp <= r['last_seen']: + r['asn_descriptions'].append(asn_descriptions[timestamp]) return render_template('ipasn.html', ipasn_details=response['response'], **response['meta'])