Fix CSV importer for place event name using gramps_id

Fixes #10239
This commit is contained in:
prculley 2017-10-25 12:02:29 -05:00 committed by Nick Hall
parent 9b42486f2f
commit 12d8b62925

View File

@ -920,6 +920,9 @@ class CSVParser:
def get_or_create_place(self, place_name): def get_or_create_place(self, place_name):
"Return the requested place object tuple-packed with a new indicator." "Return the requested place object tuple-packed with a new indicator."
if place_name.startswith("[") and place_name.endswith("]"):
place = self.lookup("place", place_name)
return (0, place)
LOG.debug("get_or_create_place: looking for: %s", place_name) LOG.debug("get_or_create_place: looking for: %s", place_name)
for place_handle in self.db.iter_place_handles(): for place_handle in self.db.iter_place_handles():
place = self.db.get_place_from_handle(place_handle) place = self.db.get_place_from_handle(place_handle)