summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2014-10-28 16:56:09 +0100
committeremkael <emkael@tlen.pl>2014-10-28 16:56:09 +0100
commit6607516ca8fddc6cad330e8789bb0f9dbcfdff3b (patch)
treeb5ccadeff3cfb35a7b1f3446a00c188a3a5e5601
parente86cc61995d59730a2fe3f04415b25b35ec207c5 (diff)
* rate action defaults to today (to prevent rating dummy future races)
-rw-r--r--f1elo/interface.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/f1elo/interface.py b/f1elo/interface.py
index a077986..6cb8fc6 100644
--- a/f1elo/interface.py
+++ b/f1elo/interface.py
@@ -50,6 +50,8 @@ class Interface:
def rate(self, date=None, _debug=False):
if date is None:
date = self.date
+ if date is None:
+ date = datetime.date.today()
elo = Elo(self.session)
race_query = self.session.query(Race).filter(Race.ranked == False)