commit/galaxy-central: natefoo: Avoid annoying errors produced by the Googlebot hitting the import library datasets to history page (it doesn't have a history).
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/a8b733b58fec/ changeset: a8b733b58fec user: natefoo date: 2012-01-16 18:38:03 summary: Avoid annoying errors produced by the Googlebot hitting the import library datasets to history page (it doesn't have a history). affected #: 1 file diff -r 096f4040e90d3516c8ad6093f4e2fcd618c43f6b -r a8b733b58fec15f2aa664eb2b3f7e72e10b622bc lib/galaxy/web/controllers/library_common.py --- a/lib/galaxy/web/controllers/library_common.py +++ b/lib/galaxy/web/controllers/library_common.py @@ -1956,7 +1956,12 @@ # to the lddas in order for the menu optin to be available. ldda = trans.sa_session.query( trans.model.LibraryDatasetDatasetAssociation ).get( ldda_id ) source_lddas.append( ldda ) - target_histories = [ current_history ] + if current_history is not None: + target_histories = [ current_history ] + else: + target_histories = [] + message = 'You must have a history before you can import datasets. You can do this by <a href="%s" target="_top">loading the analysis interface</a>.' % url_for(controller='root') + status = 'error' if user: target_histories = user.active_histories if action == 'import_to_current_history' and library_id: 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)
-
Bitbucket