Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/project_export.rb')
-rw-r--r--lib/api/project_export.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/api/project_export.rb b/lib/api/project_export.rb
index 76b3dea723a..4041e130f9e 100644
--- a/lib/api/project_export.rb
+++ b/lib/api/project_export.rb
@@ -30,7 +30,11 @@ module API
check_rate_limit! :project_download_export, [current_user, user_project]
if user_project.export_file_exists?
- present_carrierwave_file!(user_project.export_file)
+ if user_project.export_archive_exists?
+ present_carrierwave_file!(user_project.export_file)
+ else
+ render_api_error!('The project export file is not available yet', 404)
+ end
else
render_api_error!('404 Not found or has expired', 404)
end