Skip to content

Commit

Permalink
Merge branch 'fix/seed-data' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
tvcam committed Aug 24, 2023
2 parents 8b49701 + ad7da31 commit 48c3cb2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
3 changes: 0 additions & 3 deletions app/models/organization.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,6 @@ def seed_generic_data(org_id, referral_source_category_name=nil)
Importer::Import.new('Quantitative Case', general_data_file).quantitative_cases
Rake::Task["field_settings:import"].invoke(org.short_name)
Rake::Task["field_settings:import"].reenable

Thredded::MessageboardGroup.find_or_create_by(name: 'Archived', position: 0)

referral_source_category = ReferralSource.find_by(name_en: referral_source_category_name)
if referral_source_category
referral_source = ReferralSource.find_or_create_by(name: "#{org.full_name} - OSCaR Referral")
Expand Down
3 changes: 1 addition & 2 deletions app/workers/organization_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ class OrganizationWorker
sidekiq_options queue: 'priority'

def perform(org_id, referral_source_category_name)
# Do something
Organization.delay_for(10.seconds, queue: :priority).seed_generic_data(org_id, referral_source_category_name)
Organization.seed_generic_data(org_id, referral_source_category_name)
end
end
2 changes: 2 additions & 0 deletions db/seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1822,6 +1822,8 @@

Location.find_or_create_by(name: 'ផ្សេងៗ Other', order_option: 1)

Thredded::MessageboardGroup.find_or_create_by(name: 'Archived', position: 0)

# Organization.create_and_build_tenant(short_name: 'ngo_subdomain', full_name: 'NGO Name', logo: File.open(Rails.root.join('path_to_ngo_logo')))

interviewees = ['កុមារ', 'ឪពុកម្ដាយ', 'អ្នកអាណាព្យាបាល', 'អ្នកថែទាំ', 'ផ្សេងៗ (សូមបញ្ជាក់)']
Expand Down

0 comments on commit 48c3cb2

Please sign in to comment.