From a6c43cdca7550407620ec3e5c3f5a7520a79d6c1 Mon Sep 17 00:00:00 2001 From: steffen123 Date: Thu, 22 Jul 2010 19:26:11 +0200 Subject: [PATCH] TOUR: a trivial fix, a trivial change, and a few debug prints --- pyfpdb/Database.py | 9 ++++++--- pyfpdb/SQL.py | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pyfpdb/Database.py b/pyfpdb/Database.py index c7e00190..0337c3f1 100644 --- a/pyfpdb/Database.py +++ b/pyfpdb/Database.py @@ -1983,17 +1983,20 @@ class Database: (hand.tourNo, hand.siteId) ) result=cursor.fetchone() + print "result of fetching TT by number and site:",result if result: tourneyTypeId = result[0] else: # Check for an existing TTypeId that matches tourney info, if not found create it + print "info that we use to get TT by detail:", hand.siteId, hand.buyinCurrency, hand.buyin, hand.fee, hand.gametype['category'], hand.gametype['limitType'], hand.buyInChips, hand.isKO, hand.isRebuy, hand.isAddOn, hand.speed, hand.isShootout, hand.isMatrix, hand.added, hand.addedCurrency cursor.execute (self.sql.query['getTourneyTypeId'].replace('%s', self.sql.query['placeholder']), - (hand.siteId, hand.buyinCurrency, hand.buyin, hand.fee, hand.gametype['category'], hand.gametype['limitType'], hand.isKO, - hand.isRebuy, hand.isRebuy, hand.speed, hand.isShootout, hand.isMatrix, hand.added, hand.addedCurrency) + (hand.siteId, hand.buyinCurrency, hand.buyin, hand.fee, hand.gametype['category'], hand.gametype['limitType'], hand.buyInChips, hand.isKO, + hand.isRebuy, hand.isAddOn, hand.speed, hand.isShootout, hand.isMatrix, hand.added, hand.addedCurrency) ) result=cursor.fetchone() - + print "result of fetching TT by details:",result + try: tourneyTypeId = result[0] except TypeError: #this means we need to create a new entry diff --git a/pyfpdb/SQL.py b/pyfpdb/SQL.py index a3dfd5e5..b0105da7 100644 --- a/pyfpdb/SQL.py +++ b/pyfpdb/SQL.py @@ -3692,6 +3692,7 @@ class Sql: AND fee=%s AND category=%s AND limitType=%s + AND buyInChips=%s AND knockout=%s AND rebuy=%s AND addOn=%s