Skip to content

Commit 5f1734c

Browse files
committed
Allow set_disease_types to continue from where it left off
If the command fails or is killed for whatever reason, we should avoid it processing vaccination records that it has already done. Jira-Issue: MAV-2858
1 parent ca17962 commit 5f1734c

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

lib/tasks/data_migration.rake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ namespace :data_migration do
1010
task set_disease_types: :environment do
1111
VaccinationRecord
1212
.includes(:vaccine)
13+
.where(disease_types: nil)
1314
.find_each do |vaccination_record|
1415
disease_types =
1516
vaccination_record.vaccine&.disease_types ||

0 commit comments

Comments
 (0)