diff --git a/app/controllers/api/v2/rh_cloud/inventory_controller.rb b/app/controllers/api/v2/rh_cloud/inventory_controller.rb index 9df6c731..a64a4366 100644 --- a/app/controllers/api/v2/rh_cloud/inventory_controller.rb +++ b/app/controllers/api/v2/rh_cloud/inventory_controller.rb @@ -18,10 +18,10 @@ def download_file api :POST, "/organizations/:organization_id/rh_cloud/report", N_("Start report generation") param :organization_id, Integer, required: true, desc: N_("Set the current organization context for the request") - param :disconnected, :bool, required: false, desc: N_('Generate the report, but do not upload') + param :disconnected, :bool, required: false, default: false, desc: N_('Generate the report, but do not upload') def generate_report organization_id = params[:organization_id] - disconnected = params[:disconnected] + disconnected = params[:disconnected] || false start_report_generation(organization_id, disconnected) diff --git a/lib/foreman_inventory_upload/async/generate_all_reports_job.rb b/lib/foreman_inventory_upload/async/generate_all_reports_job.rb index 61d202a6..ba71fb93 100644 --- a/lib/foreman_inventory_upload/async/generate_all_reports_job.rb +++ b/lib/foreman_inventory_upload/async/generate_all_reports_job.rb @@ -20,7 +20,8 @@ def plan total_hosts = ForemanInventoryUpload::Generators::Queries.for_org(organization.id, use_batches: false).count if total_hosts <= ForemanInventoryUpload.max_org_size - plan_generate_report(ForemanInventoryUpload.generated_reports_folder, organization) + disconnected = false + plan_generate_report(ForemanInventoryUpload.generated_reports_folder, organization, disconnected) else logger.info("Skipping automatic uploads for organization #{organization.name}, too many hosts (#{total_hosts}/#{ForemanInventoryUpload.max_org_size})") end diff --git a/lib/foreman_rh_cloud/version.rb b/lib/foreman_rh_cloud/version.rb index 71fbe33b..d3855cda 100644 --- a/lib/foreman_rh_cloud/version.rb +++ b/lib/foreman_rh_cloud/version.rb @@ -1,3 +1,3 @@ module ForemanRhCloud - VERSION = '9.0.55'.freeze + VERSION = '9.0.56'.freeze end diff --git a/package.json b/package.json index f7005700..d4d19ea7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "foreman_rh_cloud", - "version": "9.0.51", + "version": "9.0.56", "description": "Inventory Upload =============", "main": "index.js", "scripts": {