fix tag update

This commit is contained in:
Damien Elmes 2010-12-08 17:05:19 +09:00
parent 3491a5e378
commit 7fc593a2ce

View file

@ -131,9 +131,9 @@ update fields set value = :v where factId = :fid and fieldModelId = :fmid""",
data) data)
# update tags # update tags
self.deck.updateProgress() self.deck.updateProgress()
if tagsIdx: if tagsIdx is not None:
data = [{'factId': fid, data = [{'fid': fid,
'tags': c.fields[tagsIdx]} 't': c.fields[tagsIdx]}
for (fid, c) in upcards] for (fid, c) in upcards]
self.deck.s.execute( self.deck.s.execute(
"update facts set tags = :t where id = :fid", "update facts set tags = :t where id = :fid",