Skip to content

Commit

Permalink
Merge pull request #38 from rschef/fix-check_assocs_never_matching
Browse files Browse the repository at this point in the history
Remove check_assocs/2 nil pattern, since it never matches
  • Loading branch information
gabrielpra1 committed Dec 15, 2019
2 parents 4d27e64 + 1e0e6c7 commit 2db8e54
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lib/context_functions_generator.ex
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,6 @@ defmodule ContextFunctionsGenerator do

def generate_function(:check_assocs, _, _, _, _) do
quote do
defp unquote(:check_assocs)(changeset, nil), do: changeset

defp unquote(:check_assocs)(changeset, constraints) when is_list(constraints) do
Enum.reduce(constraints, changeset, fn i, acc ->
Ecto.Changeset.no_assoc_constraint(acc, i)
Expand Down

0 comments on commit 2db8e54

Please sign in to comment.