4758: Copy constructor of gen.lib objects uses shallow copy instead of deep copy

svn: r16826
This commit is contained in:
Michiel Nauta 2011-03-15 21:54:37 +00:00
parent 7150429195
commit 22b13fc772
7 changed files with 8 additions and 8 deletions

View File

@ -65,7 +65,7 @@ class Attribute(SecondaryObject, PrivacyBase, SourceBase, NoteBase):
NoteBase.__init__(self, source) NoteBase.__init__(self, source)
if source: if source:
self.type = source.type self.type = AttributeType(source.type)
self.value = source.value self.value = source.value
else: else:
self.type = AttributeType() self.type = AttributeType()

View File

@ -55,8 +55,8 @@ class ChildRef(SecondaryObject, PrivacyBase, SourceBase, NoteBase, RefBase):
NoteBase.__init__(self, source) NoteBase.__init__(self, source)
RefBase.__init__(self, source) RefBase.__init__(self, source)
if source: if source:
self.frel = source.frel self.frel = ChildRefType(source.frel)
self.mrel = source.mrel self.mrel = ChildRefType(source.mrel)
else: else:
self.frel = ChildRefType() self.frel = ChildRefType()
self.mrel = ChildRefType() self.mrel = ChildRefType()

View File

@ -76,7 +76,7 @@ class Event(SourceBase, NoteBase, MediaBase, AttributeBase,
if source: if source:
self.__description = source.__description self.__description = source.__description
self.__type = source.__type self.__type = EventType(source.__type)
else: else:
self.__description = "" self.__description = ""
self.__type = EventType() self.__type = EventType()

View File

@ -58,7 +58,7 @@ class EventRef(SecondaryObject, PrivacyBase, NoteBase, AttributeBase, RefBase):
AttributeBase.__init__(self, source) AttributeBase.__init__(self, source)
RefBase.__init__(self, source) RefBase.__init__(self, source)
if source: if source:
self.__role = source.__role self.__role = EventRoleType(source.__role)
else: else:
self.__role = EventRoleType() self.__role = EventRoleType()

View File

@ -81,7 +81,7 @@ class Name(SecondaryObject, PrivacyBase, SourceBase, NoteBase, DateBase):
self.surname = source.surname self.surname = source.surname
self.suffix = source.suffix self.suffix = source.suffix
self.title = source.title self.title = source.title
self.type = source.type self.type = NameType(source.type)
self.prefix = source.prefix self.prefix = source.prefix
self.patronymic = source.patronymic self.patronymic = source.patronymic
self.group_as = source.group_as self.group_as = source.group_as

View File

@ -51,7 +51,7 @@ class RepoRef(SecondaryObject, PrivacyBase, NoteBase, RefBase):
RefBase.__init__(self, source) RefBase.__init__(self, source)
if source: if source:
self.call_number = source.call_number self.call_number = source.call_number
self.media_type = source.media_type self.media_type = SourceMediaType(source.media_type)
else: else:
self.call_number = "" self.call_number = ""
self.media_type = SourceMediaType() self.media_type = SourceMediaType()

View File

@ -59,7 +59,7 @@ class Url(SecondaryObject, PrivacyBase):
if source: if source:
self.path = source.path self.path = source.path
self.desc = source.desc self.desc = source.desc
self.type = source.type self.type = UrlType(source.type)
else: else:
self.path = "" self.path = ""
self.desc = "" self.desc = ""