Skip to content

Commit

Permalink
fix filter
Browse files Browse the repository at this point in the history
  • Loading branch information
bluzky committed Oct 22, 2020
1 parent 35266c3 commit cde7a85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/filter.ex
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ defmodule Querie.Filter do
def apply(query, filters) when is_list(filters) or is_map(filters) do
# skip field starts with underscore
filters =
Enum.reject(filters, fn {_, column, _} -> String.starts_with?(to_string(column), "_") end)
Enum.reject(filters, fn {_, {column, _}} -> String.starts_with?(to_string(column), "_") end)

d_query = filter(:and, filters)
where(query, [q], ^d_query)
Expand Down

0 comments on commit cde7a85

Please sign in to comment.