Bring gramps-connect up to date with gramps 3.3
svn: r17452
This commit is contained in:
parent
3d4f4f031c
commit
d3b47b000c
@ -445,7 +445,10 @@ class Person(PrimaryObject):
|
|||||||
"""
|
"""
|
||||||
Return the preferred name of a person.
|
Return the preferred name of a person.
|
||||||
"""
|
"""
|
||||||
return self.name_set.get(preferred=True)
|
try:
|
||||||
|
return self.name_set.get(preferred=True)
|
||||||
|
except:
|
||||||
|
return ""
|
||||||
|
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
return str(self.get_primary_name())
|
return str(self.get_primary_name())
|
||||||
@ -595,7 +598,10 @@ class Name(DateObject, SecondaryObject):
|
|||||||
_sanitized = False
|
_sanitized = False
|
||||||
|
|
||||||
def get_primary_surname(self):
|
def get_primary_surname(self):
|
||||||
return self.surname_set.get(primary=True).surname
|
try:
|
||||||
|
return self.surname_set.get(primary=True).surname
|
||||||
|
except:
|
||||||
|
return ""
|
||||||
|
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
return "%s, %s" % (self.get_primary_surname(),
|
return "%s, %s" % (self.get_primary_surname(),
|
||||||
@ -615,7 +621,9 @@ class Name(DateObject, SecondaryObject):
|
|||||||
self.title = ""
|
self.title = ""
|
||||||
|
|
||||||
def make_surname_list(self):
|
def make_surname_list(self):
|
||||||
return []
|
return [(x.surname, x.prefix, x.primary,
|
||||||
|
tuple(x.name_origin_type), x.connector) for x in
|
||||||
|
self.surname_set.all()]
|
||||||
|
|
||||||
class Lds(DateObject, SecondaryObject):
|
class Lds(DateObject, SecondaryObject):
|
||||||
"""
|
"""
|
||||||
|
@ -598,7 +598,6 @@ class DjangoInterface(object):
|
|||||||
self.add_event_ref(obj, event_ref)
|
self.add_event_ref(obj, event_ref)
|
||||||
|
|
||||||
def add_surname_list(self, name, surname_list):
|
def add_surname_list(self, name, surname_list):
|
||||||
print surname_list, name
|
|
||||||
for data in surname_list:
|
for data in surname_list:
|
||||||
(surname_text, prefix, primary, origin_type,
|
(surname_text, prefix, primary, origin_type,
|
||||||
connector) = data
|
connector) = data
|
||||||
|
Loading…
Reference in New Issue
Block a user