We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b533d92 commit c686f91Copy full SHA for c686f91
lib/ecto/association.ex
@@ -727,10 +727,13 @@ defmodule Ecto.Association do
727
defp primary_key!(struct), do: Ecto.primary_key!(struct)
728
729
def missing_fields(queryable, related_key) do
730
- Enum.filter related_key, &is_nil(queryable.__schema__(:type, &1))
+ related_key
731
+ |> List.wrap()
732
+ |> Enum.filter(&is_nil(queryable.__schema__(:type, &1)))
733
end
734
735
def missing_primary_keys(queryable, related_key) do
736
+ related_key = List.wrap related_key
737
Enum.reject queryable.__schema__(:primary_key), &(&1 in related_key)
738
739
0 commit comments