diff options
author | Julian Pawlowski <julian.pawlowski@gmail.com> | 2013-01-28 14:17:52 +0100 |
---|---|---|
committer | Julian Pawlowski <julian.pawlowski@gmail.com> | 2013-01-28 14:17:52 +0100 |
commit | 8aa7de2636dcd22781b623d5c9270f5ecf8b85c2 (patch) | |
tree | 1bb5dc36fb28c96ad9be9a2357d380c2c24ee31e /app/controllers/config_snom_controller.rb | |
parent | 39aa7132ceed3d4beab3a9b828e571bbfc67c07e (diff) | |
parent | 600574759573e48da9f5f82d4ff8a863b6830c95 (diff) |
Merge branch 'develop'5.1-beta2
Diffstat (limited to 'app/controllers/config_snom_controller.rb')
-rw-r--r-- | app/controllers/config_snom_controller.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/controllers/config_snom_controller.rb b/app/controllers/config_snom_controller.rb index 149e601..e797a43 100644 --- a/app/controllers/config_snom_controller.rb +++ b/app/controllers/config_snom_controller.rb @@ -158,12 +158,15 @@ class ConfigSnomController < ApplicationController if ! params[:sip_account].blank? @sip_account = @phone.sip_accounts.where({ :id => params[:sip_account].to_i }).first + if ! @sip_account && @phone.fallback_sip_account && @phone.fallback_sip_account.id == params[:sip_account].to_i + @sip_account = @phone.fallback_sip_account + end if ! @sip_account render( :status => 404, :layout => false, :content_type => 'text/plain', - :text => "<!-- SipAccount not found -->", + :text => "<!-- SipAccount ID:#{params[:sip_account].to_i} not found -->", ) end end |