Browse Source

Remove comments and redundant or statement

CLDC-3788-export-sales-logs
Kat 2 months ago
parent
commit
78415f9b97
  1. 2
      app/services/exports/export_service.rb
  2. 1
      app/services/exports/sales_log_export_service.rb
  3. 1
      spec/services/exports/sales_log_export_service_spec.rb

2
app/services/exports/export_service.rb

@ -33,7 +33,7 @@ module Exports
sales_archives_for_manifest = get_sales_archives(start_time, full_update, year) if Time.zone.now >= Time.zone.local(2025, 4, 1)
end
write_master_manifest(daily_run_number, lettings_archives_for_manifest.merge(sales_archives_for_manifest || {}).merge(users_archives_for_manifest).merge(organisations_archives_for_manifest))
write_master_manifest(daily_run_number, lettings_archives_for_manifest.merge(sales_archives_for_manifest).merge(users_archives_for_manifest).merge(organisations_archives_for_manifest))
end
private

1
app/services/exports/sales_log_export_service.rb

@ -42,7 +42,6 @@ module Exports
def apply_cds_transformation(sales_log, _export_mode)
sales_log.attributes_before_type_cast
# attribute_hash["formid"] = attribute_hash["old_form_id"] || (attribute_hash["id"] + LOG_ID_OFFSET)
end
def is_omitted_field?(field_name, _sales_log)

1
spec/services/exports/sales_log_export_service_spec.rb

@ -16,7 +16,6 @@ RSpec.describe Exports::SalesLogExportService do
let(:user) { FactoryBot.create(:user, email: "test1@example.com", organisation:) }
def replace_entity_ids(sales_log, export_template)
# export_template.sub!(/\{id\}/, (sales_log["id"] + Exports::SalesLogExportService::LOG_ID_OFFSET).to_s)
export_template.sub!(/\{owning_org_id\}/, sales_log["owning_organisation_id"].to_s)
export_template.sub!(/\{managing_org_id\}/, sales_log["managing_organisation_id"].to_s)
export_template.sub!(/\{assigned_to_id\}/, sales_log["assigned_to_id"].to_s)

Loading…
Cancel
Save