From e843e2587f8c551484397c4e8e96f5da41efa5f3 Mon Sep 17 00:00:00 2001 From: samyou-softwire Date: Thu, 16 Apr 2026 15:12:17 +0100 Subject: [PATCH] CLDC-4331: Record kind of schemes download --- app/controllers/organisations_controller.rb | 2 +- app/controllers/schemes_controller.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/organisations_controller.rb b/app/controllers/organisations_controller.rb index 6803e7825..40f367cf1 100644 --- a/app/controllers/organisations_controller.rb +++ b/app/controllers/organisations_controller.rb @@ -40,7 +40,7 @@ class OrganisationsController < ApplicationController end def email_schemes_csv - DownloadRecord.build_from_user(download_type: :scheme, download_filters: session_filters.to_s, user: current_user).save! + DownloadRecord.build_from_user(download_type: :scheme, download_filters: session_filters.merge({ download_type: params[:download_type] }).to_s, user: current_user).save! SchemeEmailCsvJob.perform_later(current_user, search_term, session_filters, false, @organisation, params[:download_type]) redirect_to schemes_csv_confirmation_organisation_path end diff --git a/app/controllers/schemes_controller.rb b/app/controllers/schemes_controller.rb index 4e6b75182..ebab2ff28 100644 --- a/app/controllers/schemes_controller.rb +++ b/app/controllers/schemes_controller.rb @@ -236,7 +236,7 @@ class SchemesController < ApplicationController end def email_csv - DownloadRecord.build_from_user(download_type: :scheme, download_filters: session_filters.to_s, user: current_user).save! + DownloadRecord.build_from_user(download_type: :scheme, download_filters: session_filters.merge({ download_type: params[:download_type] }).to_s, user: current_user).save! all_orgs = params["organisation_select"] == "all" SchemeEmailCsvJob.perform_later(current_user, search_term, session_filters, all_orgs, nil, params[:download_type]) redirect_to csv_confirmation_schemes_path