This repository has been archived by the owner on Jul 11, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix DetachedInstanceError after StatusCodeRedirect
In certain cases, e.g. after an exception has been thrown, the database session may be detached, but database objects managed by the orm are still refered to from the same thread. Such objects can be merged with the new db session, as described in http://stackoverflow.com/a/9705458/201743 This is done with `c.user` which is re-retrieved from repoze.who after a StatusCodeRedirect. This fixes what ade22d7 works around. See also discussion on: https://bitbucket.org/phihag/hhu- adhocracy/issue/168/error-handler-causes-is-not-bound-to-a
- Loading branch information