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(