diff --git a/ChangeLog b/ChangeLog index 7c9c9ad94..7ce567b04 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-07-30 Don Allingham + * src/GrampsDbUtils/_GedcomParse.py: assign inline note to the referencing object + * src/GrampsDbUtils/_GedcomLex.py: fix UNKNOWN gender + 2007-07-29 Brian Matherly * src/docgen/AsciiDoc.py: Make column spans work. diff --git a/example/gedcom/sample.ged b/example/gedcom/sample.ged index 8e9c05480..9540befdc 100755 --- a/example/gedcom/sample.ged +++ b/example/gedcom/sample.ged @@ -679,7 +679,7 @@ 1 NAME Really Old /Guy/ 2 GIVN Really Old 2 SURN Guy -1 SEX M +1 SEX U 1 BIRT 2 DATE 26 JUN 34 B.C. 2 PLAC Hayward, Alameda Co., CA diff --git a/src/GrampsDbUtils/_GedcomLex.py b/src/GrampsDbUtils/_GedcomLex.py index dc2d0ba64..1ffb136e8 100644 --- a/src/GrampsDbUtils/_GedcomLex.py +++ b/src/GrampsDbUtils/_GedcomLex.py @@ -169,7 +169,10 @@ class GedLine: """ Converts the data field to a RelLib token indicating the gender """ - self.data = SEX_MAP.get(self.data.strip(), RelLib.Person.UNKNOWN) + try: + self.data = SEX_MAP.get(self.data.strip()[0], RelLib.Person.UNKNOWN) + except: + self.data = RelLib.Person.UNKNOWN def calc_date(self): """ diff --git a/src/GrampsDbUtils/_GedcomParse.py b/src/GrampsDbUtils/_GedcomParse.py index 2edf33ae4..33650886d 100644 --- a/src/GrampsDbUtils/_GedcomParse.py +++ b/src/GrampsDbUtils/_GedcomParse.py @@ -4274,6 +4274,7 @@ class GedcomParser(UpdateCallback): new_note.set_handle(Utils.create_id()) self.dbase.add_note(new_note, self.trans) self.__skip_subordinate_levels(level+1) + obj.add_note(new_note.get_handle()) def __parse_inline_note(self, line, level): new_note = RelLib.Note(line.data)