* src/FamilyView.py: Corrections.

* src/Marriage.py: Corrections.


svn: r2930
This commit is contained in:
Alex Roitman 2004-02-29 00:08:12 +00:00
parent b2a14c6920
commit f5e32655f8
3 changed files with 10 additions and 6 deletions

View File

@ -6,6 +6,8 @@
find_family_no_conflicts): Use str(idVal).
* src/docgen/AsciiDoc.py: Add to CVS.
* src/Makefile.am, src/Makefile.in: Ship AsciiDoc.py.
* src/FamilyView.py: Corrections.
* src/Marriage.py: Corrections.
2004-02-28 Don Allingham <dallingham@users.sourceforge.net>
* src/gramps_main.py: switch to DB as default, remove save option

View File

@ -900,7 +900,7 @@ class FamilyView:
def find_marriage(self,family):
for event_id in family.get_event_list():
event = self.parent.db.find_event_from_id(event_id)
if event.get_name() == "Marriage":
if event and event.get_name() == "Marriage":
return event
return None

View File

@ -465,16 +465,18 @@ class Marriage:
self.etree.clear()
self.emap = {}
for event_id in self.elist:
data = self.db.find_event_from_id(event_id)
place_id = data.get_place_id()
event = self.db.find_event_from_id(event_id)
if not event:
continue
place_id = event.get_place_id()
if place_id:
place_name = self.db.find_place_from_id(place_id).get_title()
else:
place_name = ""
iter = self.etree.add([const.display_fevent(data.get_name()),
data.get_quote_date(),place_name],data)
self.emap[str(data)] = iter
iter = self.etree.add([const.display_fevent(event.get_name()),
event.get_quote_date(),place_name],event)
self.emap[str(event)] = iter
if self.elist:
self.etree.select_row(0)
Utils.bold_label(self.events_label)