[hg] galaxy 2954: History ordering bug with SQLAlchemy 0.5 (deve...
details: http://www.bx.psu.edu/hg/galaxy/rev/46791b5a653b changeset: 2954:46791b5a653b user: Nate Coraor <nate@bx.psu.edu> date: Tue Nov 03 17:16:40 2009 -0500 description: History ordering bug with SQLAlchemy 0.5 (developers - queries are no longer ordered by primary key by default, so order explicitly if it matters) and a <model_object>.c that slipped through. diffstat: lib/galaxy/jobs/__init__.py | 2 +- lib/galaxy/web/controllers/root.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diffs (25 lines): diff -r 14e178f656ba -r 46791b5a653b lib/galaxy/jobs/__init__.py --- a/lib/galaxy/jobs/__init__.py Tue Nov 03 16:53:14 2009 -0500 +++ b/lib/galaxy/jobs/__init__.py Tue Nov 03 17:16:40 2009 -0500 @@ -174,7 +174,7 @@ if self.track_jobs_in_database: for j in self.sa_session.query( model.Job ) \ .options( lazyload( "external_output_metadata" ), lazyload( "parameters" ) ) \ - .filter( model.Job.c.state == model.Job.states.NEW ): + .filter( model.Job.state == model.Job.states.NEW ): job = JobWrapper( j, self.app.toolbox.tools_by_id[ j.tool_id ], self ) new_jobs.append( job ) else: diff -r 14e178f656ba -r 46791b5a653b lib/galaxy/web/controllers/root.py --- a/lib/galaxy/web/controllers/root.py Tue Nov 03 16:53:14 2009 -0500 +++ b/lib/galaxy/web/controllers/root.py Tue Nov 03 17:16:40 2009 -0500 @@ -72,7 +72,8 @@ .filter( model.HistoryDatasetAssociation.history == history ) \ .options( eagerload( "children" ) ) \ .join( "dataset" ).filter( model.Dataset.purged == False ) \ - .options( eagerload_all( "dataset.actions" ) ) + .options( eagerload_all( "dataset.actions" ) ) \ + .order_by( model.HistoryDatasetAssociation.hid ) if not show_deleted: query = query.filter( model.HistoryDatasetAssociation.deleted == False ) return trans.stream_template_mako( "root/history.mako",
participants (1)
-
Greg Von Kuster