Re: [sqlalchemy] Passing sessions around

2011-02-09 Thread Michael Bayer
On Feb 9, 2011, at 1:59 PM, Brent McConnell wrote: > Thanks for the quick reply. I've tried to include more specific info from my > program for you to look over as well as the log. > >def approve_request(self, request_ids, session=None): >if session is None: >session =

Re: [sqlalchemy] Passing sessions around

2011-02-09 Thread Brent McConnell
Thanks for the quick reply. I've tried to include more specific info from my program for you to look over as well as the log. def approve_request(self, request_ids, session=None): if session is None: session = scopedSession() try: for requ

Re: [sqlalchemy] Passing sessions around

2011-02-09 Thread Michael Bayer
On Feb 9, 2011, at 12:01 PM, Brent McConnell wrote: > I'm having issues with the sqlalchemy session and completely realize this is > from my own lack of understanding but can't seem to find a solution. My plan > was to create a library with functions like so... > > def func1 (id, session=None

[sqlalchemy] Passing sessions around

2011-02-09 Thread Brent McConnell
I'm having issues with the sqlalchemy session and completely realize this is from my own lack of understanding but can't seem to find a solution. My plan was to create a library with functions like so... def func1 (id, session=None): result = session.add(something) retu