Skip to content

Commit

Permalink
Merge pull request #293 from lucafavatella/refactor-get-id-field
Browse files Browse the repository at this point in the history
Refactor sumo_internal:get_id_field
  • Loading branch information
cabol authored Mar 8, 2017
2 parents 045b082 + 553b6ad commit ac5ddf1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sumo_internal.erl
Original file line number Diff line number Diff line change
Expand Up @@ -200,5 +200,5 @@ report_overrun(Report) ->
%% @private
get_id_field(_Schema = #{fields := Fields}) ->
hd(lists:filter(fun(_Field = #{attrs := Attributes}) ->
length(lists:filter(fun(T) -> T =:= id end, Attributes)) > 0
lists:member(id, Attributes)
end, Fields)).

0 comments on commit ac5ddf1

Please sign in to comment.