Skip to content

Commit

Permalink
Merge pull request #9 from HISMalawi/add/recipient-types-meta
Browse files Browse the repository at this point in the history
Added missing recipient types meta data
  • Loading branch information
hopgausi authored Feb 16, 2024
2 parents f927b05 + 4aac139 commit 335db2e
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions db/seed_test_results_recepient_types.rb
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
recepient_types = ['test_results_delivered_to_site_manually','test_results_delivered_to_site_electronically']


recepient_types = %w[test_results_delivered_to_site_manually test_results_delivered_to_site_electronically
test_results_delivered_to_site_electronically_at_local_nlims_level]
puts 'loading recepient types--------------'

recepient_types.each do |type|
# tca = TestCategory.create(name: ca, description: '') 
chk = TestResultRecepientType.find_by(name: type)
if !chk.blank?
puts "#{type} already seeded"
else
tca = TestResultRecepientType.new
tca.name = type
tca.description = ""
tca.save()
puts "#{type} seeded successfuly"
end
chk = TestResultRecepientType.find_by(name: type)
if !chk.blank?
puts "#{type} already seeded"
else
tca = TestResultRecepientType.new
tca.name = type
tca.description = ''
tca.save
puts "#{type} seeded successfuly"
end
end

0 comments on commit 335db2e

Please sign in to comment.