From 52578462411f95f5e501ccc267c5fa4ccf82cbf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Tue, 21 May 2019 12:25:44 +0200 Subject: [PATCH] fix: Worse AS is position 1 (not 0). --- bgpranking/querying.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpranking/querying.py b/bgpranking/querying.py index c34e088..faa9dfc 100644 --- a/bgpranking/querying.py +++ b/bgpranking/querying.py @@ -132,7 +132,7 @@ class Querying(): if not r: r = 0 if with_position and not source: - to_return['response'] = {'rank': float(r), 'position': self.cache.zrevrank(key, asn), + to_return['response'] = {'rank': float(r), 'position': self.cache.zrevrank(key, asn) + 1, 'total_known_asns': self.cache.zcard(key)} else: to_return['response'] = float(r)