mapped objects, such that if the reference to the object
were lost when the object was pickled, we don't
erroneously try to set up _sa_instance_state - fixes
a NoneType error.
.. changelog::
:version: 0.8.1
+ .. change::
+ :tags: bug, orm
+
+ Added a conditional to the unpickling process for ORM
+ mapped objects, such that if the reference to the object
+ were lost when the object was pickled, we don't
+ erroneously try to set up _sa_instance_state - fixes
+ a NoneType error.
+
.. change::
:tags: bug, postgresql
:tickets: 2712
# setup _sa_instance_state ahead of time so that
# unpickle events can access the object normally.
# see [ticket:2362]
- manager.setup_instance(inst, self)
+ if inst is not None:
+ manager.setup_instance(inst, self)
manager.dispatch.unpickle(self, state)
def _initialize(self, key):