summaryrefslogtreecommitdiff
path: root/ausbutler/butler.py
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2017-01-17 01:26:10 +0100
committeremkael <emkael@tlen.pl>2017-01-17 01:26:10 +0100
commit9adc34fa8039d34a6b88e28e7be36feb1f3c93b8 (patch)
tree35990b89d36004afd42c68b5a1b2b16098d936a5 /ausbutler/butler.py
parentd0ba0cbae2726abc32b638a12d3b176c939c6857 (diff)
Previous butler from old database is carried over
Diffstat (limited to 'ausbutler/butler.py')
-rw-r--r--ausbutler/butler.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/ausbutler/butler.py b/ausbutler/butler.py
index d4fe1d3..abe49a2 100644
--- a/ausbutler/butler.py
+++ b/ausbutler/butler.py
@@ -44,3 +44,9 @@ def normalize(butler, opp_factor=0.5):
butler.cut_score / butler.board_count +
butler.opp_score * opp_factor
) * butler.board_count
+
+def get_old_normbutler(results, id):
+ for row in results:
+ if row.id == id:
+ return row
+ return None