From be1aaf9f7b16e18b18f3cee784fbb982857496a2 Mon Sep 17 00:00:00 2001 From: Gerald Britton Date: Sat, 5 Sep 2009 23:03:31 +0000 Subject: [PATCH] restore set_name_group_mapping method svn: r13161 --- src/gen/db/write.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/gen/db/write.py b/src/gen/db/write.py index 6fc429bdf..18fa17cc6 100644 --- a/src/gen/db/write.py +++ b/src/gen/db/write.py @@ -1310,6 +1310,18 @@ class GrampsDBDir(GrampsDbRead, Callback, UpdateCallback): self.__do_remove(handle, transaction, self.note_map, NOTE_KEY) + def set_name_group_mapping(self, name, group): + """ + Make name group under the value of group. + + If group =None, the old grouping is deleted. + """ + try: + self.__set_name_group_mapping(name, group) + except DBERRS, msg: + self.__log_error() + raise Errors.DbError(msg) + def __set_name_group_mapping(self, name, group): if not self.readonly: # Start transaction