commit/galaxy-central: carlfeberhard: Saved histories: fix new history creation when deleting a current, empty history
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/3fc486ee887a/ Changeset: 3fc486ee887a User: carlfeberhard Date: 2013-09-20 20:46:26 Summary: Saved histories: fix new history creation when deleting a current, empty history Affected #: 2 files diff -r d4c6a250afd03a942e70f04ee7da8335dfea476b -r 3fc486ee887aec89a75097477ba7a4acff0ced1b lib/galaxy/webapps/galaxy/controllers/history.py --- a/lib/galaxy/webapps/galaxy/controllers/history.py +++ b/lib/galaxy/webapps/galaxy/controllers/history.py @@ -309,7 +309,6 @@ # If deleting the current history, make a new current. if history == trans.get_history(): deleted_current = True - trans.get_or_create_default_history() trans.log_event( "History (%s) marked as deleted" % history.name ) n_deleted += 1 if purge and trans.app.config.allow_user_dataset_purge: @@ -339,6 +338,8 @@ part += " but the datasets were not removed from disk because that feature is not enabled in this Galaxy instance" message_parts.append( "%s. " % part ) if deleted_current: + #note: this needs to come after commits above or will use an empty history that was deleted above + trans.get_or_create_default_history() message_parts.append( "Your active history was deleted, a new empty history is now active. " ) status = INFO return ( status, " ".join( message_parts ) ) diff -r d4c6a250afd03a942e70f04ee7da8335dfea476b -r 3fc486ee887aec89a75097477ba7a4acff0ced1b test/functional/test_get_data.py --- a/test/functional/test_get_data.py +++ b/test/functional/test_get_data.py @@ -22,7 +22,7 @@ """ # in order to remove a lot of boiler plate - and not have cascading errors history = get_latest_history_for_user( user ) - self.delete_current_history() + self.delete_history( id=self.security.encode_id( history.id ) ) self.is_history_empty() return get_latest_history_for_user( user ) 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