From 5fd3dddf2b8b8868f5d37c9feb7acb94430da18a Mon Sep 17 00:00:00 2001 From: Chaz Date: Wed, 1 Dec 2010 16:35:38 -0500 Subject: [PATCH] * update_hudcache wasn't updating existing cashgame records because it was trying to match a NULL tourneyTypeId with a %s None value. Changed the logic of the SQL to handle this situation. It appeared like someone had tried to handle this by adding '+0' to the NULL record but it doesn't work. * Deleted the attempted '+0' NULL value handling for gametypeId. gametypeId should never be null as an error would have already been thrown before it was inserted --- pyfpdb/SQL.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pyfpdb/SQL.py b/pyfpdb/SQL.py index d45ccd38..1f91e822 100644 --- a/pyfpdb/SQL.py +++ b/pyfpdb/SQL.py @@ -3964,11 +3964,12 @@ class Sql: street2Raises=street2Raises+%s, street3Raises=street3Raises+%s, street4Raises=street4Raises+%s - WHERE gametypeId+0=%s + WHERE gametypeId=%s AND playerId=%s AND activeSeats=%s AND position=%s - AND tourneyTypeId+0=%s + AND (case when tourneyTypeId is NULL then 1 else + (case when tourneyTypeId=%s then 1 else 0 end) end)=1 AND styleKey=%s""" self.query['get_hero_hudcache_start'] = """select min(hc.styleKey)