Remove Event and Family media on Individual Pages if the Event and Family pages are already being created.

svn: r18599
This commit is contained in:
Rob G. Healey 2011-12-14 19:43:24 +00:00
parent 58172ea0a3
commit 11858a624d

View File

@ -4888,12 +4888,21 @@ class IndividualPage(BasePage):
photo_list = self.person.get_media_list() photo_list = self.person.get_media_list()
media_list = photo_list[:] media_list = photo_list[:]
# if Family Pages are not being created, then include the Family Media objects?
# there is no reason to add these objects to the Individual Pages...
if not self.inc_families:
for handle in self.person.get_family_handle_list(): for handle in self.person.get_family_handle_list():
family = db.get_family_from_handle(handle) family = db.get_family_from_handle(handle)
if family:
media_list += family.get_media_list() media_list += family.get_media_list()
for evt_ref in family.get_event_ref_list(): for evt_ref in family.get_event_ref_list():
event = db.get_event_from_handle(evt_ref.ref) event = db.get_event_from_handle(evt_ref.ref)
media_list += event.get_media_list() media_list += event.get_media_list()
# if the Event Pages are not being createsd, then include the Event Media objects?
# there is no reason to add these objects to the Individual Pages...
if not self.inc_events:
for evt_ref in self.person.get_primary_event_ref_list(): for evt_ref in self.person.get_primary_event_ref_list():
event = db.get_event_from_handle(evt_ref.ref) event = db.get_event_from_handle(evt_ref.ref)
if event: if event: