Re-did patch to fix import when no hero is defined
This commit is contained in:
parent
dc839c9cae
commit
b00c30cbbf
|
@ -1890,7 +1890,7 @@ class Database:
|
||||||
if doinsert:
|
if doinsert:
|
||||||
for h in hbulk:
|
for h in hbulk:
|
||||||
id = h.pop()
|
id = h.pop()
|
||||||
if (hdata['sc'] != None and hdata['sc']['bk']) and hdata['gsc']['bk']:
|
if hdata['sc'] and hdata['gsc']:
|
||||||
h[4] = hdata['sc'][id]['id']
|
h[4] = hdata['sc'][id]['id']
|
||||||
h[5] = hdata['gsc'][id]['id']
|
h[5] = hdata['gsc'][id]['id']
|
||||||
q = self.sql.query['store_hand']
|
q = self.sql.query['store_hand']
|
||||||
|
|
|
@ -306,9 +306,9 @@ dealt whether they were seen in a 'dealt to' line
|
||||||
sc = db.prepSessionsCache(self.dbid_hands, self.dbid_pids, self.startTime, sc, self.heros, doinsert)
|
sc = db.prepSessionsCache(self.dbid_hands, self.dbid_pids, self.startTime, sc, self.heros, doinsert)
|
||||||
gsc = db.storeSessionsCache(self.dbid_hands, self.dbid_pids, self.startTime, self.gametype
|
gsc = db.storeSessionsCache(self.dbid_hands, self.dbid_pids, self.startTime, self.gametype
|
||||||
,self.dbid_gt, self.handsplayers, sc, gsc, tz, self.heros, doinsert)
|
,self.dbid_gt, self.handsplayers, sc, gsc, tz, self.heros, doinsert)
|
||||||
if doinsert:
|
if doinsert and sc['bk'] and gsc['bk']:
|
||||||
self.hands['sc'] = sc
|
self.hands['sc'] = sc
|
||||||
self.hands['gsc'] = gsc
|
self.hands['gsc'] = gsc
|
||||||
else:
|
else:
|
||||||
self.hands['sc'] = None
|
self.hands['sc'] = None
|
||||||
self.hands['gsc'] = None
|
self.hands['gsc'] = None
|
||||||
|
|
Loading…
Reference in New Issue
Block a user