From 1796ccca710b94ac1f76fbf2433b458924bbbee1 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Fri, 3 Aug 2007 21:55:02 +0000 Subject: [PATCH] Schema evolution: Adding a trash member to those Notebooks that don't have it. --- model/Notebook.py | 6 ++++++ 1 file changed, 6 insertions(+) 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.