Skip to content

Commit 9a9989b

Browse files
committed
Rescuing ActiveRecord::NoDatabaseError when dropping tenants
1 parent d63b7b5 commit 9a9989b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/tasks/apartment.rake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ apartment_namespace = namespace :apartment do
2222
begin
2323
puts("Dropping #{tenant} tenant")
2424
Apartment::Tenant.drop(tenant)
25-
rescue Apartment::TenantNotFound => e
25+
rescue Apartment::TenantNotFound, ActiveRecord::NoDatabaseError => e
2626
puts e.message
2727
end
2828
end

0 commit comments

Comments
 (0)