From cca48a0ced0df3a1ec2d24b90ea3fb426aa2ce69 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sun, 28 Aug 2011 14:40:00 +0900 Subject: [PATCH] thinko --- anki/facts.py | 2 +- anki/models.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/anki/facts.py b/anki/facts.py index ad746945b..03ef68903 100644 --- a/anki/facts.py +++ b/anki/facts.py @@ -108,7 +108,7 @@ insert or replace into facts values (?, ?, ?, ?, ?, ?, ?, ?)""", ################################################## def hasTag(self, tag): - return self.deck.tags.inStr(tag, self.tags) + return self.deck.tags.inList(tag, self.tags) def stringTags(self): return self.deck.tags.canonify(self.tags) diff --git a/anki/models.py b/anki/models.py index 76b496f50..d94815890 100644 --- a/anki/models.py +++ b/anki/models.py @@ -155,10 +155,6 @@ select id from cards where fid in (select id from facts where mid = ?)""", return self.deck.db.scalar( "select count() from facts where mid = ?", m['id']) - def css(self): - "CSS for all models." - return "\n".join([m['css'] for m in self.all()]) - # Copying ################################################## @@ -171,6 +167,10 @@ select id from cards where fid in (select id from facts where mid = ?)""", # CSS generation ################################################## + def css(self): + "CSS for all models." + return "\n".join([m['css'] for m in self.all()]) + def _css(self, m): # fields css = "".join(self._fieldCSS(