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.
This commit is contained in:
Mika Bostrom 2010-02-27 17:41:52 +02:00
parent f04d91d712
commit 4042fc6c40

View File

@ -1713,8 +1713,8 @@ class Database:
line[55] = gid # gametypeId line[55] = gid # gametypeId
line[56] = pids[p] # playerId line[56] = pids[p] # playerId
line[57] = len(pids) # activeSeats 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' } 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'])] line[58] = pos[pdata[p]['position']]
line[59] = pdata[p]['tourneyTypeId'] line[59] = pdata[p]['tourneyTypeId']
line[60] = styleKey # styleKey line[60] = styleKey # styleKey
inserts.append(line) inserts.append(line)