Thanks, Michael, it was my mistake. I use sqlalchemy with pyramid and comment = ReportComment(content=form.content.data, user=self.request.user)
where self.request.user is class RequestFactory(Request): @reify def user(self): db = DBSession() username = unauthenticated_userid(self) if username is not None: return db.query(User).filter_by(username=username).first() that is why I have 'broken' session :/ -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To view this discussion on the web visit https://groups.google.com/d/msg/sqlalchemy/-/TEhPf5UVzJcJ. To post to this group, send email to sqlalchemy@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.