Skip to content

Commit a8c2ab2

Browse files
committed
ensure the state is set back to normal
1 parent 1045589 commit a8c2ab2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

services/web/server/src/simcore_service_webserver/exporter/request_handlers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,11 @@ async def export_project(request: web.Request):
6969
except Exception as e:
7070
# make sure all errors are trapped and the directory where the file is sotred is removed
7171
await remove_dir(temp_dir)
72+
raise e
73+
finally:
7274
await retrieve_and_notify_project_locked_state(
7375
user_id, project_uuid, request.app
7476
)
75-
raise e
7677

7778
headers = {"Content-Disposition": f'attachment; filename="{file_to_download.name}"'}
7879

@@ -144,11 +145,10 @@ async def duplicate_project(request: web.Request):
144145
exported_project_path=exported_project_path,
145146
)
146147
return dict(uuid=duplicated_project_uuid)
147-
except Exception:
148+
finally:
148149
await retrieve_and_notify_project_locked_state(
149150
user_id, project_uuid, request.app
150151
)
151-
raise
152152

153153

154154
rest_handler_functions = {

0 commit comments

Comments
 (0)