From dc0d9511a31cbcb2bbeb9beab31aeb07708fa5e9 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Sat, 31 Jul 2010 15:55:56 +0000 Subject: [PATCH] Only use iter_items if you are sure it is used just once; fixed issue duplicating places svn: r15673 --- src/plugins/import/ImportCsv.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/plugins/import/ImportCsv.py b/src/plugins/import/ImportCsv.py index 849b2d526..5e917f8bd 100644 --- a/src/plugins/import/ImportCsv.py +++ b/src/plugins/import/ImportCsv.py @@ -909,10 +909,8 @@ class CSVParser(object): return person def get_or_create_place(self,place_name): - place_list = self.db.iter_place_handles() - LOG.debug("get_or_create_place: list: %s", list(place_list)) LOG.debug("get_or_create_place: looking for: %s", place_name) - for place_handle in place_list: + for place_handle in self.db.iter_place_handles(): place = self.db.get_place_from_handle(place_handle) if place.get_title() == place_name: return (0, place)