diff --git a/model/Notebook.py b/model/Notebook.py index 6dd461d..aa31cf6 100644 --- a/model/Notebook.py +++ b/model/Notebook.py @@ -15,6 +15,12 @@ class Notebook( Persistent ): def __init__( self, note_id ): ValueError.__init__( self, note_id ) + def __setstate__( self, state ): + if "_Notebook__trash" not in state: + state[ "_Notebook__trash" ] = None + + self.__dict__.update( state ) + def __init__( self, id, name, trash = None ): """ Create a new note with the given id and name.