Use fallback dates when no birth or death dates
svn: r10596
This commit is contained in:
		@@ -39,6 +39,7 @@ Mary Smith was born on 3/28/1923.
 | 
				
			|||||||
#------------------------------------------------------------------------
 | 
					#------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from BasicUtils import name_displayer
 | 
					from BasicUtils import name_displayer
 | 
				
			||||||
 | 
					from ReportBase import ReportUtils
 | 
				
			||||||
import DateHandler
 | 
					import DateHandler
 | 
				
			||||||
import gen.lib
 | 
					import gen.lib
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -80,16 +81,14 @@ class SubstKeywords:
 | 
				
			|||||||
        self.m = ""
 | 
					        self.m = ""
 | 
				
			||||||
        self.M = ""
 | 
					        self.M = ""
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        birth_ref = person.get_birth_ref()
 | 
					        birth = ReportUtils.get_birth_or_fallback(database, person)
 | 
				
			||||||
        if birth_ref:
 | 
					        if birth:
 | 
				
			||||||
            birth = database.get_event_from_handle(birth_ref.ref)
 | 
					 | 
				
			||||||
            self.b = DateHandler.get_date(birth)
 | 
					            self.b = DateHandler.get_date(birth)
 | 
				
			||||||
            bplace_handle = birth.get_place_handle()
 | 
					            bplace_handle = birth.get_place_handle()
 | 
				
			||||||
            if bplace_handle:
 | 
					            if bplace_handle:
 | 
				
			||||||
                self.B = database.get_place_from_handle(bplace_handle).get_title()
 | 
					                self.B = database.get_place_from_handle(bplace_handle).get_title()
 | 
				
			||||||
        death_ref = person.get_death_ref()
 | 
					        death = ReportUtils.get_death_or_fallback(database, person)
 | 
				
			||||||
        if death_ref:
 | 
					        if death:
 | 
				
			||||||
            death = database.get_event_from_handle(death_ref.ref)
 | 
					 | 
				
			||||||
            self.d = DateHandler.get_date(death)
 | 
					            self.d = DateHandler.get_date(death)
 | 
				
			||||||
            dplace_handle = death.get_place_handle()
 | 
					            dplace_handle = death.get_place_handle()
 | 
				
			||||||
            if dplace_handle:
 | 
					            if dplace_handle:
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user