[hg] galaxy 3236: Bug fix for uploading files to a history.
details: http://www.bx.psu.edu/hg/galaxy/rev/4fc2b29d6393 changeset: 3236:4fc2b29d6393 user: Greg Von Kuster <greg@bx.psu.edu> date: Wed Jan 13 18:33:42 2010 -0500 description: Bug fix for uploading files to a history. diffstat: lib/galaxy/tools/actions/upload_common.py | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diffs (32 lines): diff -r bfb0f6c64093 -r 4fc2b29d6393 lib/galaxy/tools/actions/upload_common.py --- a/lib/galaxy/tools/actions/upload_common.py Wed Jan 13 18:02:37 2010 -0500 +++ b/lib/galaxy/tools/actions/upload_common.py Wed Jan 13 18:33:42 2010 -0500 @@ -59,7 +59,7 @@ role = trans.sa_session.query( trans.app.model.Role ).get( role_id ) library_bunch.roles.append( role ) return library_bunch -def get_precreated_datasets( trans, params, data_obj, controller='root' ): +def get_precreated_datasets( trans, params, data_obj, controller='root' ): """ Get any precreated datasets (when using asynchronous uploads). """ @@ -75,15 +75,15 @@ log.exception( 'Unable to load precreated dataset (%s) sent in upload form' % id ) continue if data_obj is trans.app.model.HistoryDatasetAssociation: - if user is None and trans.galaxy_session.current_history != data.history: + if trans.user is None and trans.galaxy_session.current_history != data.history: log.error( 'Got a precreated dataset (%s) but it does not belong to anonymous user\'s current session (%s)' % ( data.id, trans.galaxy_session.id ) ) - elif data.history.user != user: - log.error( 'Got a precreated dataset (%s) but it does not belong to current user (%s)' % ( data.id, user.id ) ) + elif data.history.user != trans.user: + log.error( 'Got a precreated dataset (%s) but it does not belong to current user (%s)' % ( data.id, trans.user.id ) ) else: rval.append( data ) elif data_obj is trans.app.model.LibraryDatasetDatasetAssociation: if controller == 'library' and not trans.app.security_agent.can_add_library_item( roles, data.library_dataset.folder ): - log.error( 'Got a precreated dataset (%s) but this user (%s) is not allowed to write to it' % ( data.id, user.id ) ) + log.error( 'Got a precreated dataset (%s) but this user (%s) is not allowed to write to it' % ( data.id, trans.user.id ) ) else: rval.append( data ) return rval
participants (1)
-
Greg Von Kuster