From eee82ae27ee2e99d35693ee1583709da3d9bbdd2 Mon Sep 17 00:00:00 2001 From: prculley Date: Tue, 21 Nov 2017 09:17:57 -0600 Subject: [PATCH] Fix Gedcom import for illegal Gedcom Family Attributes Issue #10262 TMG Gedcom exports an illegal NCHI with sub-data for FAM. Gramps could not handle this and attached the sub-data to the FAM creating some corrupted Event records. --- gramps/plugins/lib/libgedcom.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gramps/plugins/lib/libgedcom.py b/gramps/plugins/lib/libgedcom.py index be121beca..8a4625ae7 100644 --- a/gramps/plugins/lib/libgedcom.py +++ b/gramps/plugins/lib/libgedcom.py @@ -5226,12 +5226,20 @@ class GedcomParser(UpdateCallback): def __family_attr(self, line, state): """ + Parses an TOKEN that Gramps recognizes as an Attribute @param line: The current line in GedLine format @type line: GedLine @param state: The current state @type state: CurrentState """ + sub_state = CurrentState() + sub_state.person = state.person + sub_state.attr = line.data + sub_state.level = state.level + 1 state.family.add_attribute(line.data) + self.__parse_level(sub_state, self.person_attr_parse_tbl, + self.__ignore) + state.msg += sub_state.msg def __family_cust_attr(self, line, state): """