I notice you begin building the query with one dbsession which must be a ScopedSession, then call dbsession.remove(), and then execute the query.
It would probably be better to put dbsession.remove() at the top of the function. -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-discuss@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.