mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
add a default group to model, add groupName()
This commit is contained in:
parent
f256d18971
commit
6ed48171fc
2 changed files with 4 additions and 0 deletions
|
@ -556,6 +556,9 @@ update facts set tags = :t, mod = :n where id = :id""", [fix(row) for row in res
|
|||
"A list of all group names."
|
||||
return self.db.list("select name from groups order by name")
|
||||
|
||||
def groupName(self, id):
|
||||
return self.db.scalar("select name from groups where id = ?", id)
|
||||
|
||||
def groupId(self, name):
|
||||
"Return the id for NAME, creating if necessary."
|
||||
id = self.db.scalar("select id from groups where name = ?", name)
|
||||
|
|
|
@ -11,6 +11,7 @@ from anki.lang import _
|
|||
|
||||
defaultConf = {
|
||||
'sortf': 0,
|
||||
'gid': 1,
|
||||
}
|
||||
|
||||
defaultField = {
|
||||
|
|
Loading…
Reference in a new issue