From 4042fc6c40b9cd4f03f0be9ae9e854662ba114f1 Mon Sep 17 00:00:00 2001 From: Mika Bostrom Date: Sat, 27 Feb 2010 17:41:52 +0200 Subject: [PATCH] Use sqlcoder's fix for position map The values for pdata[p]['position'] come from DerivedStats.py, where the value was explicitly cast to a string. This way it should work again and use the cleaner code from sqlcoder instead. --- pyfpdb/Database.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyfpdb/Database.py b/pyfpdb/Database.py index f24a7c33..d0fe733b 100644 --- a/pyfpdb/Database.py +++ b/pyfpdb/Database.py @@ -1713,8 +1713,8 @@ class Database: line[55] = gid # gametypeId line[56] = pids[p] # playerId line[57] = len(pids) # activeSeats - pos = {'B':'B', 'S':'S', '0':'D', '1':'C', '2':'M', '3':'M', '4':'M', '5':'E', '6':'E', '7':'E', '8':'E', '9':'E' } - line[58] = pos[str(pdata[p]['position'])] + pos = {'B':'B', 'S':'S', 0:'D', 1:'C', 2:'M', 3:'M', 4:'M', 5:'E', 6:'E', 7:'E', 8:'E', 9:'E' } + line[58] = pos[pdata[p]['position']] line[59] = pdata[p]['tourneyTypeId'] line[60] = styleKey # styleKey inserts.append(line)