Skip to content

Commit

Permalink
1590, fix bug when request /api/rest/admin/active-calls?filter[orig-g…
Browse files Browse the repository at this point in the history
…w-id-eq]=1
  • Loading branch information
Ivanov-Anton committed Oct 23, 2024
1 parent 3747453 commit 1d9b6c5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/models/yeti/cdrs_filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,12 @@ def generate_filter

EQ_FILTERABLE.each do |k|
%i[eq equals].each do |suff|
filter.add_filter { |cdr| cdr[:"#{k}"].to_i == search_param(k, suff).to_i } if searchable?(k, suff)
search_values = search_param(k, suff)
next unless searchable?(k, suff)

search_values.each do |value|
filter.add_filter { |cdr| cdr[:"#{k}"].to_i == value.to_i }
end
end
end
STARTS_WITH_FILTERABLE.each do |k|
Expand Down

0 comments on commit 1d9b6c5

Please sign in to comment.