diff --git a/src/gen/lib/eventref.py b/src/gen/lib/eventref.py index 3a9aca0d0..32a3ef39c 100644 --- a/src/gen/lib/eventref.py +++ b/src/gen/lib/eventref.py @@ -49,7 +49,12 @@ class EventRef(SecondaryObject, PrivacyBase, NoteBase, AttributeBase, RefBase): to the refereneced event. """ - __slots__=('.__role') + __slots__=('__role') + + def __getstate__(self): + return{'__role': self.__role} + def __setstate__(self,dict_): + self.__role = dict_('__role') def __init__(self, source=None): """ diff --git a/src/gen/lib/grampstype.py b/src/gen/lib/grampstype.py index 175901da9..e8575494c 100644 --- a/src/gen/lib/grampstype.py +++ b/src/gen/lib/grampstype.py @@ -95,6 +95,12 @@ class GrampsType(object): __metaclass__ = GrampsTypeMeta __slots__ = ('__value','__string') + + def __getstate__(self): + return {'__value': self.__value,'__string': self.__string} + def __setstate__(self,dict_): + self.__value = dict_['__value'] + self.__string = dict_['__string'] @classmethod def __class_init__(cls, namespace):