From d80a7454ce4f81d6ca044489448f4ec499bc2c8f Mon Sep 17 00:00:00 2001 From: Muhsin Date: Wed, 1 Apr 2026 15:28:08 +0400 Subject: [PATCH] chore: run teardown_voice callback only on update --- enterprise/app/models/enterprise/channel/twilio_sms.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/enterprise/app/models/enterprise/channel/twilio_sms.rb b/enterprise/app/models/enterprise/channel/twilio_sms.rb index f7fcf9e84..23f727a2f 100644 --- a/enterprise/app/models/enterprise/channel/twilio_sms.rb +++ b/enterprise/app/models/enterprise/channel/twilio_sms.rb @@ -8,7 +8,7 @@ module Enterprise::Channel::TwilioSms validate :voice_requires_phone_number, if: :voice_enabled? before_validation :provision_twiml_app, on: :create, if: :voice_enabled? before_validation :provision_twiml_app_on_update, on: :update, if: :voice_enabled_changed_to_true? - after_commit :teardown_voice, if: :voice_disabled? + after_commit :teardown_voice, on: :update, if: :voice_disabled? end end