diff --git a/server/szurubooru/middleware/db_session.py b/server/szurubooru/middleware/db_session.py index 059b073..63b741e 100644 --- a/server/szurubooru/middleware/db_session.py +++ b/server/szurubooru/middleware/db_session.py @@ -8,5 +8,4 @@ class DbSession(object): request.context.session = self._session_factory() def process_response(self, request, _response, _resource): - # any commits need to happen explicitly in the API layer. - request.context.session.close() + self._session_factory.remove()