Revert some map calls to list comps to correct bug introduced in rev. 14104
svn: r14191
This commit is contained in:
parent
d6205d09d1
commit
7975d5c3c4
@ -63,7 +63,7 @@ class AddressBase(object):
|
|||||||
"""
|
"""
|
||||||
Convert a serialized tuple of data to an object.
|
Convert a serialized tuple of data to an object.
|
||||||
"""
|
"""
|
||||||
self.address_list = map(Address().unserialize, data)
|
self.address_list = [Address().unserialize(item) for item in data]
|
||||||
|
|
||||||
def add_address(self, address):
|
def add_address(self, address):
|
||||||
"""
|
"""
|
||||||
|
@ -67,7 +67,7 @@ class AttributeBase(object):
|
|||||||
"""
|
"""
|
||||||
Convert a serialized tuple of data to an object.
|
Convert a serialized tuple of data to an object.
|
||||||
"""
|
"""
|
||||||
self.attribute_list = map(Attribute().unserialize, data)
|
self.attribute_list = [Attribute().unserialize(item) for item in data]
|
||||||
|
|
||||||
def add_attribute(self, attribute):
|
def add_attribute(self, attribute):
|
||||||
"""
|
"""
|
||||||
|
@ -68,7 +68,7 @@ class LdsOrdBase(object):
|
|||||||
"""
|
"""
|
||||||
Convert a serialized tuple of data to an object
|
Convert a serialized tuple of data to an object
|
||||||
"""
|
"""
|
||||||
self.lds_ord_list = map(LdsOrd().unserialize, data)
|
self.lds_ord_list = [LdsOrd().unserialize(item) for item in data]
|
||||||
|
|
||||||
def add_lds_ord(self, lds_ord):
|
def add_lds_ord(self, lds_ord):
|
||||||
"""
|
"""
|
||||||
|
@ -60,7 +60,7 @@ class MediaBase(object):
|
|||||||
"""
|
"""
|
||||||
Convert a serialized tuple of data to an object.
|
Convert a serialized tuple of data to an object.
|
||||||
"""
|
"""
|
||||||
self.media_list = map(MediaRef().unserialize, data)
|
self.media_list = [MediaRef().unserialize(item) for item in data]
|
||||||
|
|
||||||
def add_media_reference(self, media_ref):
|
def add_media_reference(self, media_ref):
|
||||||
"""
|
"""
|
||||||
|
@ -82,7 +82,7 @@ class Source(MediaBase, NoteBase, PrimaryObject):
|
|||||||
self.marker.unserialize(marker)
|
self.marker.unserialize(marker)
|
||||||
NoteBase.unserialize(self, note_list)
|
NoteBase.unserialize(self, note_list)
|
||||||
MediaBase.unserialize(self, media_list)
|
MediaBase.unserialize(self, media_list)
|
||||||
self.reporef_list = map(RepoRef().unserialize, reporef_list)
|
self.reporef_list = [RepoRef().unserialize(item) for item in reporef_list]
|
||||||
|
|
||||||
def _has_handle_reference(self, classname, handle):
|
def _has_handle_reference(self, classname, handle):
|
||||||
"""
|
"""
|
||||||
|
@ -61,7 +61,7 @@ class SourceBase(object):
|
|||||||
"""
|
"""
|
||||||
Convert a serialized tuple of data to an object.
|
Convert a serialized tuple of data to an object.
|
||||||
"""
|
"""
|
||||||
self.source_list = map(SourceRef().unserialize, data)
|
self.source_list = [SourceRef().unserialize(item) for item in data]
|
||||||
|
|
||||||
def add_source_reference(self, src_ref) :
|
def add_source_reference(self, src_ref) :
|
||||||
"""
|
"""
|
||||||
|
@ -63,7 +63,7 @@ class UrlBase(object):
|
|||||||
"""
|
"""
|
||||||
Convert a serialized tuple of data to an object.
|
Convert a serialized tuple of data to an object.
|
||||||
"""
|
"""
|
||||||
self.urls = map(Url().unserialize, data)
|
self.urls = [Url().unserialize(item) for item in data]
|
||||||
|
|
||||||
def get_url_list(self):
|
def get_url_list(self):
|
||||||
"""
|
"""
|
||||||
|
@ -129,7 +129,7 @@ class FamilyModel(FlatBaseModel):
|
|||||||
return unicode(gen.lib.FamilyRelType(data[5]))
|
return unicode(gen.lib.FamilyRelType(data[5]))
|
||||||
|
|
||||||
def column_marriage(self, data):
|
def column_marriage(self, data):
|
||||||
erlist = map(gen.lib.EventRef().unserialize, data[6])
|
erlist = [gen.lib.EventRef().unserialize(item) for item in data[6]]
|
||||||
erlist = [x for x in erlist if x.get_role()==EventRoleType.FAMILY or
|
erlist = [x for x in erlist if x.get_role()==EventRoleType.FAMILY or
|
||||||
x.get_role()==EventRoleType.PRIMARY]
|
x.get_role()==EventRoleType.PRIMARY]
|
||||||
event = self.db.marriage_from_eventref_list(erlist)
|
event = self.db.marriage_from_eventref_list(erlist)
|
||||||
@ -139,7 +139,7 @@ class FamilyModel(FlatBaseModel):
|
|||||||
return u''
|
return u''
|
||||||
|
|
||||||
def sort_marriage(self, data):
|
def sort_marriage(self, data):
|
||||||
erlist = map(gen.lib.EventRef().unserialize, data[6])
|
erlist = [gen.lib.EventRef().unserialize(item) for item in data[6]]
|
||||||
event = self.db.marriage_from_eventref_list(erlist)
|
event = self.db.marriage_from_eventref_list(erlist)
|
||||||
if event:
|
if event:
|
||||||
return "%09d" % event.date.get_sort_value()
|
return "%09d" % event.date.get_sort_value()
|
||||||
|
Loading…
Reference in New Issue
Block a user