summaryrefslogtreecommitdiff
path: root/lib/api/group_export.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/group_export.rb')
-rw-r--r--lib/api/group_export.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/api/group_export.rb b/lib/api/group_export.rb
index 6134515032f..7e4fdba6033 100644
--- a/lib/api/group_export.rb
+++ b/lib/api/group_export.rb
@@ -23,7 +23,11 @@ module API
check_rate_limit! :group_download_export, [current_user, user_group]
if user_group.export_file_exists?
- present_carrierwave_file!(user_group.export_file)
+ if user_group.export_archive_exists?
+ present_carrierwave_file!(user_group.export_file)
+ else
+ render_api_error!('The group export file is not available yet', 404)
+ end
else
render_api_error!('404 Not found or has expired', 404)
end