diff options
author | Peter Kozak <spag@golwen.net> | 2014-04-12 06:27:21 +0000 |
---|---|---|
committer | Peter Kozak <spag@golwen.net> | 2014-04-12 06:27:21 +0000 |
commit | 6a3504945884f8c04897fb09160eb1a79c3b3f02 (patch) | |
tree | 0a6be8788b519e4b87e4b62d5f671c4ee0f1e50d /app/controllers | |
parent | e55885d613d2372869ff740e5d35633eb22a1da0 (diff) |
fallback_sip_account can be nildevelop
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/config_pingtel_controller.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/controllers/config_pingtel_controller.rb b/app/controllers/config_pingtel_controller.rb index f161d7d..5bdc41d 100644 --- a/app/controllers/config_pingtel_controller.rb +++ b/app/controllers/config_pingtel_controller.rb @@ -57,10 +57,12 @@ class ConfigPingtelController < ApplicationController 'USER_DEFAULT_OUTBOUND_LINE' => 'PHONESET_LINE', } + sip_accounts = Array.new + if @phone.sip_accounts.any? sip_accounts = @phone.sip_accounts - else - sip_accounts = [@phone.fallback_sip_account] + elsif @phone.fallback_sip_account + sip_accounts << @phone.fallback_sip_account end if sip_accounts.any? |