From fe87e8d7f43b4a8fe6a401e032d136c348dd5531 Mon Sep 17 00:00:00 2001 From: emkael Date: Wed, 29 Oct 2014 15:16:15 +0100 Subject: * bugfix for obtaining driver ranking --- f1elo/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/f1elo/model.py b/f1elo/model.py index 3c27ac9..2fc4c0c 100644 --- a/f1elo/model.py +++ b/f1elo/model.py @@ -20,7 +20,7 @@ class Driver(Base): def get_ranking(self, rank_date=None): ranks = self.rankings if rank_date is not None: - ranks = [r for r in ranks if r.rank_date < rank_date] + ranks = [r for r in ranks if r.rank_date <= rank_date] if len(ranks): return ranks[-1] return None -- cgit v1.2.3