TourneySummary: SQLite complaining about Decimal format.

Variables were already passed in as int - allow them to remain so
This commit is contained in:
Worros 2011-03-10 18:03:21 +08:00 committed by Steffen Schaumburg
parent 72f6a1ce6a
commit d7697f4328

View File

@ -245,13 +245,13 @@ class TourneySummary(object):
Adds a player to the tourney, and initialises data structures indexed by player. Adds a player to the tourney, and initialises data structures indexed by player.
rank (int) indicating the finishing rank (can be -1 if unknown) rank (int) indicating the finishing rank (can be -1 if unknown)
name (string) player name name (string) player name
winnings (decimal) the money the player ended the tourney with (can be 0, or -1 if unknown) winnings (int) the money the player ended the tourney with (can be 0, or -1 if unknown)
""" """
log.debug(_("addPlayer: rank:%s - name : '%s' - Winnings (%s)") % (rank, name, winnings)) log.debug(_("addPlayer: rank:%s - name : '%s' - Winnings (%s)") % (rank, name, winnings))
self.players.append(name) self.players.append(name)
if rank: if rank:
self.ranks.update( { name : Decimal(rank) } ) self.ranks.update( { name : rank } )
self.winnings.update( { name : Decimal(winnings) } ) self.winnings.update( { name : winnings } )
self.winningsCurrency.update( { name : winningsCurrency } ) self.winningsCurrency.update( { name : winningsCurrency } )
else: else:
self.ranks.update( { name : None } ) self.ranks.update( { name : None } )