From b4379f91f33e2acdf7bec949840b01ad7255ba48 Mon Sep 17 00:00:00 2001 From: Audrey Hamelers Date: Tue, 23 Apr 2024 19:36:59 +0200 Subject: [PATCH] fix old class being called which caused download url to be broken --- app/controllers/stash_api/datasets_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/stash_api/datasets_controller.rb b/app/controllers/stash_api/datasets_controller.rb index 3230debdd4..151a2023bb 100644 --- a/app/controllers/stash_api/datasets_controller.rb +++ b/app/controllers/stash_api/datasets_controller.rb @@ -390,7 +390,7 @@ def update def download res = @stash_identifier.latest_downloadable_resource(user: @user) @version_presigned = Stash::Download::VersionPresigned.new(controller_context: self, resource: res) - if res&.may_download?(ui_user: @user) && @zip_version_presigned.valid_resource? + if res&.may_download?(ui_user: @user) && @version_presigned.valid_resource? @version_presigned.download(resource: res) else render plain: 'Download for this version of the dataset is unavailable', status: 404