commit/galaxy-central: carlfeberhard: Saved histories (and grids in gen.): fix busted query in grids when using log_actions=True
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/9ebd7732e616/ Changeset: 9ebd7732e616 Branch: stable User: carlfeberhard Date: 2013-07-18 00:42:46 Summary: Saved histories (and grids in gen.): fix busted query in grids when using log_actions=True Affected #: 1 file diff -r fd4113962c32b67ea0623b6cfd37be63e26ef7c6 -r 9ebd7732e616492f4570587496f1b9074cb2eac7 lib/galaxy/web/framework/helpers/grids.py --- a/lib/galaxy/web/framework/helpers/grids.py +++ b/lib/galaxy/web/framework/helpers/grids.py @@ -225,7 +225,13 @@ params = cur_filter_dict.copy() params['sort'] = sort_key params['async'] = ( 'async' in kwargs ) - trans.log_action( trans.get_user(), unicode( "grid.view" ), context, params ) + + #TODO:?? + # commenting this out; when this fn calls session.add( action ) and session.flush the query from this fn + # is effectively 'wiped' out. Nate believes it has something to do with our use of session( autocommit=True ) + # in mapping.py. If you change that to False, the log_action doesn't affect the query + # Below, I'm rendering the template first (that uses query), then calling log_action, then returning the page + #trans.log_action( trans.get_user(), unicode( "grid.view" ), context, params ) # Render grid. def url( *args, **kwargs ): @@ -260,7 +266,7 @@ # utf-8 unicode; however, this would require encoding the object as utf-8 before returning the grid # results via a controller method, which is require substantial changes. Hence, for now, return grid # as str. - return trans.fill_template( iff( async_request, self.async_template, self.template ), + page = trans.fill_template( iff( async_request, self.async_template, self.template ), grid=self, query=query, cur_page_num = page_num, @@ -280,6 +286,9 @@ # Pass back kwargs so that grid template can set and use args without # grid explicitly having to pass them. kwargs=kwargs ) + trans.log_action( trans.get_user(), unicode( "grid.view" ), context, params ) + return page + def get_ids( self, **kwargs ): id = [] if 'id' in kwargs: Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org