From e18e0519d8f75e9b2fb1703ee1256ea1b9cc693d Mon Sep 17 00:00:00 2001 From: Frederic Sapet Date: Mon, 26 Aug 2019 15:53:01 +0200 Subject: [PATCH] explicitly create the file with object_store.create function --- lib/galaxy/webapps/galaxy/controllers/async.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/webapps/galaxy/controllers/async.py b/lib/galaxy/webapps/galaxy/controllers/async.py index 019b86dd749..402de1d2a24 100644 --- a/lib/galaxy/webapps/galaxy/controllers/async.py +++ b/lib/galaxy/webapps/galaxy/controllers/async.py @@ -147,10 +147,11 @@ class ASync(BaseUIController): data.info = GALAXY_INFO trans.sa_session.add(data) # Need to add data to session before setting state (setting state requires that the data object is in the session, but this may change) data.state = data.states.NEW - open(data.file_name, 'wb').close() # create the file trans.history.add_dataset(data, genome_build=GALAXY_BUILD) trans.sa_session.add(trans.history) trans.sa_session.flush() + # Need to explicitly create the file + data.dataset.object_store.create(data) trans.log_event("Added dataset %d to history %d" % (data.id, trans.history.id), tool_id=tool_id) try: