fix some sqlite and unicode issues (thanks to Gerko)
This commit is contained in:
parent
002a84ba5a
commit
264b75b5b0
|
@ -297,7 +297,8 @@ class Filters(threading.Thread):
|
||||||
|
|
||||||
def __set_hero_name(self, w, site):
|
def __set_hero_name(self, w, site):
|
||||||
_name = w.get_text()
|
_name = w.get_text()
|
||||||
_guiname = Charset.to_gui(_name)
|
# get_text() returns a str but we want internal variables to be unicode:
|
||||||
|
_guiname = unicode(_name)
|
||||||
self.heroes[site] = _guiname
|
self.heroes[site] = _guiname
|
||||||
# print "DEBUG: setting heroes[%s]: %s"%(site, self.heroes[site])
|
# print "DEBUG: setting heroes[%s]: %s"%(site, self.heroes[site])
|
||||||
|
|
||||||
|
|
|
@ -319,7 +319,7 @@ class GuiGraphViewer (threading.Thread):
|
||||||
winnings = self.db.cursor.fetchall()
|
winnings = self.db.cursor.fetchall()
|
||||||
self.db.rollback()
|
self.db.rollback()
|
||||||
|
|
||||||
if winnings == ():
|
if len(winnings) == 0:
|
||||||
return (None, None, None)
|
return (None, None, None)
|
||||||
|
|
||||||
green = map(lambda x:float(x[1]), winnings)
|
green = map(lambda x:float(x[1]), winnings)
|
||||||
|
|
|
@ -2021,6 +2021,7 @@ class Sql:
|
||||||
elif db_server == 'sqlite':
|
elif db_server == 'sqlite':
|
||||||
self.query['playerDetailedStats'] = """
|
self.query['playerDetailedStats'] = """
|
||||||
select <hgameTypeId> AS hgametypeid
|
select <hgameTypeId> AS hgametypeid
|
||||||
|
,<playerName> AS pname
|
||||||
,gt.base
|
,gt.base
|
||||||
,gt.category AS category
|
,gt.category AS category
|
||||||
,upper(gt.limitType) AS limittype
|
,upper(gt.limitType) AS limittype
|
||||||
|
@ -2072,6 +2073,7 @@ class Sql:
|
||||||
inner join Hands h on (h.id = hp.handId)
|
inner join Hands h on (h.id = hp.handId)
|
||||||
inner join Gametypes gt on (gt.Id = h.gameTypeId)
|
inner join Gametypes gt on (gt.Id = h.gameTypeId)
|
||||||
inner join Sites s on (s.Id = gt.siteId)
|
inner join Sites s on (s.Id = gt.siteId)
|
||||||
|
inner join Players p on (p.Id = hp.playerId)
|
||||||
where hp.playerId in <player_test>
|
where hp.playerId in <player_test>
|
||||||
<game_test>
|
<game_test>
|
||||||
/*and hp.tourneysPlayersId IS NULL*/
|
/*and hp.tourneysPlayersId IS NULL*/
|
||||||
|
|
Loading…
Reference in New Issue
Block a user