Skip to content

Commit ae33bb1

Browse files
fix: treat re-upload of deleted vaccination as conflicting &:discarded?
This fixes the bug where once a vaccination record is discarded, it can never be imported again. Jira-Issue: MAV-1346
1 parent 21e7285 commit ae33bb1

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

app/models/immunisation_import_row.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ def to_vaccination_record
124124
delivery_method: delivery_method_value,
125125
delivery_site: delivery_site_value,
126126
notes: notes&.to_s,
127-
vaccine_id: vaccine&.id
127+
vaccine_id: vaccine&.id,
128+
discarded_at: nil
128129
}
129130

130131
vaccination_record =

app/views/imports/issues/show.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<%= render AppCardComponent.new(heading_level: 2, colour: "blue") do |c| %>
3030
<% c.with_heading { "#{@existing_or_deleted.capitalize} record" } %>
3131
<% if @type == "child" %>
32-
<%= render AppChildSummaryComponent.new(@patient.with_pending_changes) %>
32+
<%= render AppChildSummaryComponent.new(@patient) %>
3333
<% else %>
3434
<%= render AppVaccinationRecordSummaryComponent.new(
3535
@vaccination_record, current_user:,

0 commit comments

Comments
 (0)