4758: Copy constructor of gen.lib objects uses shallow copy instead of deep copy
svn: r16826
This commit is contained in:
parent
7150429195
commit
22b13fc772
@ -65,7 +65,7 @@ class Attribute(SecondaryObject, PrivacyBase, SourceBase, NoteBase):
|
||||
NoteBase.__init__(self, source)
|
||||
|
||||
if source:
|
||||
self.type = source.type
|
||||
self.type = AttributeType(source.type)
|
||||
self.value = source.value
|
||||
else:
|
||||
self.type = AttributeType()
|
||||
|
@ -55,8 +55,8 @@ class ChildRef(SecondaryObject, PrivacyBase, SourceBase, NoteBase, RefBase):
|
||||
NoteBase.__init__(self, source)
|
||||
RefBase.__init__(self, source)
|
||||
if source:
|
||||
self.frel = source.frel
|
||||
self.mrel = source.mrel
|
||||
self.frel = ChildRefType(source.frel)
|
||||
self.mrel = ChildRefType(source.mrel)
|
||||
else:
|
||||
self.frel = ChildRefType()
|
||||
self.mrel = ChildRefType()
|
||||
|
@ -76,7 +76,7 @@ class Event(SourceBase, NoteBase, MediaBase, AttributeBase,
|
||||
|
||||
if source:
|
||||
self.__description = source.__description
|
||||
self.__type = source.__type
|
||||
self.__type = EventType(source.__type)
|
||||
else:
|
||||
self.__description = ""
|
||||
self.__type = EventType()
|
||||
|
@ -58,7 +58,7 @@ class EventRef(SecondaryObject, PrivacyBase, NoteBase, AttributeBase, RefBase):
|
||||
AttributeBase.__init__(self, source)
|
||||
RefBase.__init__(self, source)
|
||||
if source:
|
||||
self.__role = source.__role
|
||||
self.__role = EventRoleType(source.__role)
|
||||
else:
|
||||
self.__role = EventRoleType()
|
||||
|
||||
|
@ -81,7 +81,7 @@ class Name(SecondaryObject, PrivacyBase, SourceBase, NoteBase, DateBase):
|
||||
self.surname = source.surname
|
||||
self.suffix = source.suffix
|
||||
self.title = source.title
|
||||
self.type = source.type
|
||||
self.type = NameType(source.type)
|
||||
self.prefix = source.prefix
|
||||
self.patronymic = source.patronymic
|
||||
self.group_as = source.group_as
|
||||
|
@ -51,7 +51,7 @@ class RepoRef(SecondaryObject, PrivacyBase, NoteBase, RefBase):
|
||||
RefBase.__init__(self, source)
|
||||
if source:
|
||||
self.call_number = source.call_number
|
||||
self.media_type = source.media_type
|
||||
self.media_type = SourceMediaType(source.media_type)
|
||||
else:
|
||||
self.call_number = ""
|
||||
self.media_type = SourceMediaType()
|
||||
|
@ -59,7 +59,7 @@ class Url(SecondaryObject, PrivacyBase):
|
||||
if source:
|
||||
self.path = source.path
|
||||
self.desc = source.desc
|
||||
self.type = source.type
|
||||
self.type = UrlType(source.type)
|
||||
else:
|
||||
self.path = ""
|
||||
self.desc = ""
|
||||
|
Loading…
Reference in New Issue
Block a user