diff --git a/pyfpdb/Database.py b/pyfpdb/Database.py index 4efc832f..fe00cd45 100644 --- a/pyfpdb/Database.py +++ b/pyfpdb/Database.py @@ -2054,6 +2054,14 @@ class Database: cursor = self.get_cursor() for row in inserts: + #convert all True/False values to numeric 0/1 + # needed because columns in hudcache are not BOOL they are INT + # and are being summed if an existing hudcache entry exists + # psycopg2 module does not automatically convert these to numeric. + # mantis bug #93 + for ind in range(len(row)): + if row[ind] == True: row[ind] = 1 + if row[ind] == False: row[ind] = 0 # Try to do the update first: num = cursor.execute(update_hudcache, row) #print "DEBUG: values: %s" % row[-6:] diff --git a/pyfpdb/RushNotesAux.py b/pyfpdb/RushNotesAux.py index 0a82d996..7620ceb3 100644 --- a/pyfpdb/RushNotesAux.py +++ b/pyfpdb/RushNotesAux.py @@ -243,7 +243,7 @@ class RushNotes(Aux_Window): c.execute(("SELECT handId, position, startCards, street0Aggr, tableName " + "FROM Hands, HandsPlayers " + "WHERE HandsPlayers.handId = Hands.id " + - "AND street0VPI = 1 " + + "AND street0VPI = True " + "AND startCards > 0 " + "AND playerId = %d " + "ORDER BY startCards DESC " +