From d5ce999d301a703953707dd3087fd40023a18494 Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Sat, 30 Oct 2010 21:55:39 +0000 Subject: [PATCH] Only convert main location to new format if it exists svn: r16087 --- src/gen/db/upgrade.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gen/db/upgrade.py b/src/gen/db/upgrade.py index 937341a91..bf996a847 100644 --- a/src/gen/db/upgrade.py +++ b/src/gen/db/upgrade.py @@ -187,7 +187,8 @@ def gramps_upgrade_15(self): for handle in self.place_map.keys(): place = self.place_map[handle] new_place = list(place) - new_place[5] = convert_location(new_place[5]) + if new_place[5] is not None: + new_place[5] = convert_location(new_place[5]) new_place[6] = [convert_location(loc) for loc in new_place[6]] new_place = new_place[:11] + new_place[12:] new_place = tuple(new_place)