From a050704299f54fe403a53760a786b819f5cd5891 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Tue, 24 Dec 2013 09:30:39 -0500 Subject: [PATCH] Protection from fields that are None in Struct --- gramps/gen/merge/diff.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gramps/gen/merge/diff.py b/gramps/gen/merge/diff.py index 7f9ab581b..111b6f2d1 100644 --- a/gramps/gen/merge/diff.py +++ b/gramps/gen/merge/diff.py @@ -475,7 +475,10 @@ class Struct(object): """ if hasattr(item, "classname") and self.db: obj = self.db.get_from_name_and_handle(item.classname, str(item)) - return Struct(obj.to_struct(), self.db) + if obj: + return Struct(obj.to_struct(), self.db) + else: + return None else: return item