Skip to content

Commit

Permalink
Add patter matching case for nil prefix on add_prefix function
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamingechoes committed Jul 27, 2017
1 parent c27bbc8 commit 61737dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/paper_trail.ex
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,6 @@ defmodule PaperTrail do
Map.drop(model, [:__struct__, :__meta__] ++ relationships)
end

defp add_prefix(changeset), do: changeset
defp add_prefix(changeset, nil), do: changeset
defp add_prefix(changeset, prefix), do: Ecto.put_meta(changeset, prefix: prefix)
end

0 comments on commit 61737dc

Please sign in to comment.