From 9608af29a1956ab1f1ba8121bf6eaacab402e0e1 Mon Sep 17 00:00:00 2001 From: Benny Malengier Date: Sun, 24 Oct 2010 21:57:05 +0000 Subject: [PATCH] allow no surname list to be created when needed svn: r16044 --- src/gen/lib/surnamebase.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gen/lib/surnamebase.py b/src/gen/lib/surnamebase.py index 82186e9be..52786ea1f 100644 --- a/src/gen/lib/surnamebase.py +++ b/src/gen/lib/surnamebase.py @@ -135,7 +135,10 @@ class SurnameBase(object): return surname if self.surname_list: return self.surname_list[0] - return None + else: + #self healing, add a surname to this object and return it + self.set_surname_list([Surname()]) + return self.surname_list[0] def set_primary_surname(self, surnamenr=0): """