Skip to content

Commit 6be908d

Browse files
committed
Rename processed? to processed_at?
Jira-issue: MAV-6746
1 parent 8ce5dd5 commit 6be908d

6 files changed

Lines changed: 6 additions & 10 deletions

File tree

app/components/app_import_summary_component.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
import.parent_relationships.present? %>
6969
<% if import.removing_parent_relationships? %>
7070
<p class="nhsuk-u-secondary-text-colour">Parent-child relationships are currently being removed from this import</p>
71-
<% elsif import.processed? && import.parent_relationships.any? %>
71+
<% elsif import.processed_at? && import.parent_relationships.any? %>
7272
<p>
7373
<%= link_to "Remove all parent-child relationships from import", imports_bulk_remove_parents_path(import.class.name.underscore, import.id) %>
7474
</p>

app/controllers/class_imports_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def show
4949
redirect_to re_review_class_import_path(@class_import) and return
5050
end
5151

52-
if @class_import.processed? || @class_import.partially_processed?
52+
if @class_import.processed_at? || @class_import.partially_processed?
5353
@pagy, @patients = pagy(@class_import.patients.includes(:school))
5454

5555
@duplicates =

app/controllers/cohort_imports_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def show
4848
redirect_to re_review_cohort_import_path(@cohort_import) and return
4949
end
5050

51-
if @cohort_import.processed? || @cohort_import.partially_processed?
51+
if @cohort_import.processed_at? || @cohort_import.partially_processed?
5252
@pagy, @patients = pagy(@cohort_import.patients.includes(:school))
5353

5454
@duplicates =

app/jobs/process_patient_changeset_job.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class ProcessPatientChangesetJob < ApplicationJob
55

66
def perform(patient_changeset_id)
77
patient_changeset = PatientChangeset.find(patient_changeset_id)
8-
return if patient_changeset.processed?
8+
return if patient_changeset.processed_at?
99

1010
unique_nhs_number = get_unique_nhs_number(patient_changeset)
1111
if unique_nhs_number

app/models/concerns/csv_importable.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,6 @@ def parse_rows!
141141
end
142142
end
143143

144-
def processed?
145-
processed_at != nil
146-
end
147-
148144
def remove!
149145
return if csv_removed?
150146
update!(csv_data: nil, csv_removed_at: Time.zone.now)
@@ -218,7 +214,7 @@ def count_columns
218214
end
219215

220216
def ensure_processed_with_count_statistics
221-
if processed? && count_columns.any? { |column| send(column).nil? }
217+
if processed_at? && count_columns.any? { |column| send(column).nil? }
222218
raise "Count statistics must be set for a processed import."
223219
end
224220
end

app/views/imports/show.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
) %>
7878
<% end %>
7979

80-
<% if import.processed? || import.partially_processed? || import.removing_parent_relationships? %>
80+
<% if import.processed_at? || import.partially_processed? || import.removing_parent_relationships? %>
8181

8282
<% if @cancelled.present? %>
8383
<h2 class="nhsuk-u-reading-width">

0 commit comments

Comments
 (0)