* 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
This commit is contained in:
Chaz 2010-12-01 16:35:38 -05:00
parent 68b92b5130
commit 5fd3dddf2b

View File

@ -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)