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 25, 2023
2 parents 187a33b + 3adb8fb commit c1ac648
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/workers/organization_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ class OrganizationWorker
def perform(org_id)
organization = Organization.find(org_id)

Apartment::Tenant.create(organization.short_name)
begin
Apartment::Tenant.create(organization.short_name)
else Apartment::TenantExists => e
Rails.logger.info "Tenant #{organization.short_name} already exists"
# Continue
end

organisation.update(onboarding_status: 'seeding_default_data')

Organization.seed_generic_data(organization.id, organization.referral_source_category_name)
Expand Down

0 comments on commit c1ac648

Please sign in to comment.