Skip to content

Commit

Permalink
Remove call to binary_to_existing_atom (#712)
Browse files Browse the repository at this point in the history
This function is only available from OTP 23 and ginger is stuck on OTP 22

Co-authored-by: Colin de Roos <colin@driebit.nl>
  • Loading branch information
cdfa and Colin de Roos committed Sep 9, 2022
1 parent 60d537d commit 33225dd
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions modules/mod_ginger_base/support/ginger_search.erl
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,15 @@ parse_argument({Key, <<"undefined">>}) ->
parse_argument({hassubjects, Subjects}) ->
lists:map(
fun(Subject) ->
{hassubject, parse_predicate(Subject)}
{hassubject, Subject}
end,
Subjects
);

parse_argument({hasobjects, Objects}) ->
lists:map(
fun(Object) ->
{hasobject, parse_predicate(Object)}
{hasobject, Object}
end,
Objects
);
Expand Down Expand Up @@ -309,12 +309,6 @@ parse_argument({boost_featured, true}) ->
parse_argument(Arg) ->
[Arg].

parse_predicate(P) ->
case P of
[Node, PredName] -> [Node, erlang:binary_to_existing_atom(PredName)];
_ -> P
end.

date_facet(Property) ->
%% A facet on a date property is a min/max range.
[
Expand Down

0 comments on commit 33225dd

Please sign in to comment.