From 7970b041131a1f1d3e595744ab67723972309bb6 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Sun, 15 Mar 2015 00:31:15 -0400 Subject: [PATCH] DictionaryDb: fixed return type in get_person_from_gramps_id; added get_place_from_gramps_id --- gramps/gen/db/dictionary.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gramps/gen/db/dictionary.py b/gramps/gen/db/dictionary.py index 389b2c155..d3974774a 100644 --- a/gramps/gen/db/dictionary.py +++ b/gramps/gen/db/dictionary.py @@ -660,7 +660,13 @@ class DictionaryDb(DbWriteBase, DbReadBase): for person in self.person_map.values(): if person.gramps_id == gramps_id: return person - return person + return None + + def get_place_from_gramps_id(self, gramps_id): + for place in self.place_map.values(): + if place.gramps_id == gramps_id: + return place + return None def get_number_of_people(self): return len(self.person_map)