From ec9dbcc04527ba15909d9d7f7492d39ce013fc4d Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Wed, 21 Jan 2015 21:42:05 +0000 Subject: [PATCH] 7844: Check that the mediapath is not set to None --- gramps/gen/db/upgrade.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gramps/gen/db/upgrade.py b/gramps/gen/db/upgrade.py index b8b6e4804..6577b1021 100644 --- a/gramps/gen/db/upgrade.py +++ b/gramps/gen/db/upgrade.py @@ -252,7 +252,10 @@ def gramps_upgrade_17(self): # Modify Media # --------------------------------- # Add new checksum field. - base_path = self.metadata.get(b'mediapath', '') + base_path = self.metadata.get(b'mediapath') + if base_path is None: + # Check that the mediapath is not set to None (bug #7844). + base_path = '' for handle in self.media_map.keys(): media = self.media_map[handle] new_media = list(media)