Support for same hero name on multiple sites also implemented in GuiGraph

This commit is contained in:
Gerko de Roo 2010-01-26 20:20:17 +01:00
parent 9b89a5d1b7
commit 12c93ea9a6

View File

@ -149,7 +149,9 @@ class GuiGraphViewer (threading.Thread):
sitenos.append(siteids[site]) sitenos.append(siteids[site])
c = self.db.get_cursor() c = self.db.get_cursor()
_hname = Charset.to_utf8(heroes[site]) _hname = Charset.to_utf8(heroes[site])
c.execute(self.sql.query['getPlayerId'], (_hname,)) # Nasty hack to deal with multiple sites + same player name -Eric
que = self.sql.query['getPlayerId'] + " AND siteId=%d" % siteids[site]
c.execute(que, (_hname,))
result = c.fetchall() result = c.fetchall()
if len(result) == 1: if len(result) == 1:
playerids.append( int(result[0][0]) ) playerids.append( int(result[0][0]) )