1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
--- a/OmniDB/OmniDB_app/include/Spartacus/Database.py
+++ b/OmniDB/OmniDB_app/include/Spartacus/Database.py
@@ -1859,6 +1859,16 @@ class PostgreSQL(Generic):
if not v_keep:
self.Close()
+ def __getstate__(self):
+ state = self.__dict__.copy()
+ # don't pickle 'v_special'
+ del state["v_special"]
+ return state
+
+ def __setstate__(self, state):
+ self.__dict__.update(state)
+ # add 'v_special' back since it doesn't exist in the pickle
+ self.v_special = PGSpecial()
'''
------------------------------------------------------------------------
|