Skip to content

Commit

Permalink
fix worker
Browse files Browse the repository at this point in the history
  • Loading branch information
tvcam committed Aug 25, 2023
1 parent dccbfbb commit 3adb8fb
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 3adb8fb

Please sign in to comment.