diff --git a/pyteomics/proforma.py b/pyteomics/proforma.py index 8049724..3a17f58 100644 --- a/pyteomics/proforma.py +++ b/pyteomics/proforma.py @@ -658,6 +658,8 @@ def __reduce__(self): return self.__class__, (self.value, self.extra, self.group_id, self.style), self.__getstate__() def __getstate__(self): + if self._definition is None: + return None state = self._definition.copy() state['source'] = None return state