summaryrefslogtreecommitdiff
path: root/app/models/softkey.rb
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-06-20 19:06:19 +0200
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-06-20 19:06:19 +0200
commiteb0e1cc5c26275ff3e5c341404e8bc558f8312b8 (patch)
tree71f449ccd6f15422717de3ac24f87d5e888ddd79 /app/models/softkey.rb
parentdf6e17e48995f25e72509986f30700d778b179b6 (diff)
parent3b27a5d45b12f6bac65da2a8e17387bfda42a2f1 (diff)
Merge branch 'develop'
Diffstat (limited to 'app/models/softkey.rb')
-rw-r--r--app/models/softkey.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/models/softkey.rb b/app/models/softkey.rb
index 27527f9..7e9b66d 100644
--- a/app/models/softkey.rb
+++ b/app/models/softkey.rb
@@ -35,10 +35,9 @@ class Softkey < ActiveRecord::Base
map{ |phone_number| phone_number.phone_numberable.hunt_group.id }.
uniq
- call_forwards = call_forwards + CallForward.where(:destinationable_type => 'HuntGroup', :destinationable_id => hunt_group_ids, :call_forwardable_type => 'PhoneNumber').
- where('call_forwardable_id NOT IN (?)', phone_numbers_ids)
+ call_forwards = call_forwards + CallForward.where(:destinationable_type => 'HuntGroup', :destinationable_id => hunt_group_ids, :call_forward_case_id => CallForwardCase.where(:value => 'assistant').first.try(:id))
- return call_forwards
+ return call_forwards.uniq
end
def possible_blf_sip_accounts