Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/components/app_import_summary_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
import.parent_relationships.present? %>
<% if import.removing_parent_relationships? %>
<p class="nhsuk-u-secondary-text-colour">Parent-child relationships are currently being removed from this import</p>
<% elsif import.processed? && import.parent_relationships.any? %>
<% elsif import.processed_at? && import.parent_relationships.any? %>
<p>
<%= link_to "Remove all parent-child relationships from import", imports_bulk_remove_parents_path(import.class.name.underscore, import.id) %>
</p>
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/class_imports_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def show
redirect_to re_review_class_import_path(@class_import) and return
end

if @class_import.processed? || @class_import.partially_processed?
if @class_import.processed_at? || @class_import.partially_processed?
@pagy, @patients = pagy(@class_import.patients.includes(:school))

@duplicates =
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/cohort_imports_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def show
redirect_to re_review_cohort_import_path(@cohort_import) and return
end

if @cohort_import.processed? || @cohort_import.partially_processed?
if @cohort_import.processed_at? || @cohort_import.partially_processed?
@pagy, @patients = pagy(@cohort_import.patients.includes(:school))

@duplicates =
Expand Down
2 changes: 1 addition & 1 deletion app/jobs/process_patient_changeset_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class ProcessPatientChangesetJob < ApplicationJob

def perform(patient_changeset_id)
patient_changeset = PatientChangeset.find(patient_changeset_id)
return if patient_changeset.processed?
return if patient_changeset.processed_at?

unique_nhs_number = get_unique_nhs_number(patient_changeset)
if unique_nhs_number
Expand Down
6 changes: 1 addition & 5 deletions app/models/concerns/csv_importable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,6 @@ def parse_rows!
end
end

def processed?
processed_at != nil
end

def remove!
return if csv_removed?
update!(csv_data: nil, csv_removed_at: Time.zone.now)
Expand Down Expand Up @@ -218,7 +214,7 @@ def count_columns
end

def ensure_processed_with_count_statistics
if processed? && count_columns.any? { |column| send(column).nil? }
if processed_at? && count_columns.any? { |column| send(column).nil? }
raise "Count statistics must be set for a processed import."
end
end
Expand Down
2 changes: 1 addition & 1 deletion app/views/imports/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
) %>
<% end %>

<% if import.processed? || import.partially_processed? || import.removing_parent_relationships? %>
<% if import.processed_at? || import.partially_processed? || import.removing_parent_relationships? %>

<% if @cancelled.present? %>
<h2 class="nhsuk-u-reading-width">
Expand Down
Loading