Skip to content

Commit

Permalink
Fix deprecation on Elixir v1.16
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Jun 7, 2023
1 parent c01f88e commit ba9ede4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ecto/association.ex
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ defmodule Ecto.Association do
|> Enum.map(&elem(&1, 0))

# If we're preloading we don't need the last table since it is the owner table.
filtered_list = if(join_to == nil, do: Enum.slice(filtered_list, 0..-2), else: filtered_list)
filtered_list = if(join_to == nil, do: Enum.drop(filtered_list, -1), else: filtered_list)

[source | joins] = filtered_list

Expand Down

0 comments on commit ba9ede4

Please sign in to comment.