make sure allowEmptyAnswer is a bool

This commit is contained in:
Damien Elmes 2009-01-04 05:30:15 +09:00
parent ee71c66cdb
commit a5d64aaa7f
2 changed files with 2 additions and 2 deletions

View file

@ -1839,7 +1839,7 @@ alter table decks add column newCount integer not null default 0""")
alter table decks add column revCardOrder integer not null default 0""")
if ver < 18:
s.execute("""
alter table cardModels add column allowEmptyAnswer integer not null default 1""")
alter table cardModels add column allowEmptyAnswer boolean not null default 1""")
except:
pass
deck = s.query(Deck).get(1)

View file

@ -96,7 +96,7 @@ cardModelsTable = Table(
Column('editAnswerFontFamily', UnicodeText, default=None),
Column('editAnswerFontSize', Integer, default=None),
# empty answer
Column('allowEmptyAnswer', Integer, default=True))
Column('allowEmptyAnswer', Boolean, default=True))
class CardModel(object):
"""Represents how to generate the front and back of a card."""