From 12c93ea9a6f50fdc7c13fd466551e43033d70a15 Mon Sep 17 00:00:00 2001 From: Gerko de Roo Date: Tue, 26 Jan 2010 20:20:17 +0100 Subject: [PATCH] Support for same hero name on multiple sites also implemented in GuiGraph --- pyfpdb/GuiGraphViewer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyfpdb/GuiGraphViewer.py b/pyfpdb/GuiGraphViewer.py index 3351b70f..ce1df577 100644 --- a/pyfpdb/GuiGraphViewer.py +++ b/pyfpdb/GuiGraphViewer.py @@ -149,7 +149,9 @@ class GuiGraphViewer (threading.Thread): sitenos.append(siteids[site]) c = self.db.get_cursor() _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() if len(result) == 1: playerids.append( int(result[0][0]) )