Merge branch 'master' of git://git.assembla.com/fpdb

This commit is contained in:
Eratosthenes 2010-07-22 13:25:45 -04:00
commit 8de59c0400
2 changed files with 7 additions and 3 deletions

View File

@ -1983,17 +1983,20 @@ class Database:
(hand.tourNo, hand.siteId) (hand.tourNo, hand.siteId)
) )
result=cursor.fetchone() result=cursor.fetchone()
print "result of fetching TT by number and site:",result
if result: if result:
tourneyTypeId = result[0] tourneyTypeId = result[0]
else: else:
# Check for an existing TTypeId that matches tourney info, if not found create it # 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']), 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.siteId, hand.buyinCurrency, hand.buyin, hand.fee, hand.gametype['category'], hand.gametype['limitType'], hand.buyInChips, hand.isKO,
hand.isRebuy, hand.isRebuy, hand.speed, hand.isShootout, hand.isMatrix, hand.added, hand.addedCurrency) hand.isRebuy, hand.isAddOn, hand.speed, hand.isShootout, hand.isMatrix, hand.added, hand.addedCurrency)
) )
result=cursor.fetchone() result=cursor.fetchone()
print "result of fetching TT by details:",result
try: try:
tourneyTypeId = result[0] tourneyTypeId = result[0]
except TypeError: #this means we need to create a new entry except TypeError: #this means we need to create a new entry

View File

@ -3692,6 +3692,7 @@ class Sql:
AND fee=%s AND fee=%s
AND category=%s AND category=%s
AND limitType=%s AND limitType=%s
AND buyInChips=%s
AND knockout=%s AND knockout=%s
AND rebuy=%s AND rebuy=%s
AND addOn=%s AND addOn=%s