Browse Source

remove expected_log_count and processed

- these fields are no longer used or needed
bulk-upload-resume-v2
Phil Lee 2 years ago
parent
commit
c6dd98f0d6
  1. 2
      app/services/bulk_upload/lettings/log_creator.rb
  2. 2
      app/views/bulk_upload_lettings_resume/confirm.html.erb
  3. 4
      spec/services/bulk_upload/lettings/log_creator_spec.rb

2
app/services/bulk_upload/lettings/log_creator.rb

@ -23,8 +23,6 @@ class BulkUpload::Lettings::LogCreator
Sentry.capture_exception(e)
end
end
bulk_upload.update!(processed: true)
end
private

2
app/views/bulk_upload_lettings_resume/confirm.html.erb

@ -7,7 +7,7 @@
<span class="govuk-caption-l">Bulk upload for lettings (<%= @bulk_upload.year_combo %>)</span>
<h1 class="govuk-heading-l">Are you sure you want to upload all logs from this bulk upload?</h1>
<p class="govuk-body">There are <%= pluralize(@bulk_upload.expected_log_count, "log") %> in this bulk upload with <%= pluralize(@bulk_upload.bulk_upload_errors.count, "error") %> that still need to be fixed after upload.</p>
<p class="govuk-body">There are <%= pluralize(@bulk_upload.logs.rewhere(visible: false).count, "log") %> in this bulk upload with <%= pluralize(@bulk_upload.bulk_upload_errors.count, "error") %> that still need to be fixed after upload.</p>
<%= govuk_warning_text(icon_fallback_text: "Danger") do %>
You can not delete logs once you create them

4
spec/services/bulk_upload/lettings/log_creator_spec.rb

@ -27,10 +27,6 @@ RSpec.describe BulkUpload::Lettings::LogCreator do
expect(log.bulk_upload).to eql(bulk_upload)
expect(bulk_upload.lettings_logs).to include(log)
end
it "marks bulk upload as processed" do
expect { service.call }.to change(bulk_upload, :processed?).from(false).to(true)
end
end
context "when a valid csv with several blank rows" do

Loading…
Cancel
Save