Closed jerelmiller closed 2 years ago
Hello, it's pretty clear:) first thing to do is to add a failing test. I'll work on that when I have time in the next few days, feel free to add one if you have time, otherwise I'll be on it some time later. Once we have a failing test, it will be solved pretty much immediately.
Perfect! Hopefully I get some free time tomorrow to help out here! Thanks for getting back so quick!
Hey there! Thanks so much for this library! I've found great value in it!
I am using
PolymorphicEmbed.traverse_errors/2
as a replacement forEcto.Changeset.traverse_errors/2
and noticed that the function blows on aFunctionClauseError
if the polymorphic embed is valid. I see that if the embedded changeset is valid, it applies the changes, which results in that field converted from a changeset to a struct. When traversing errors, it appears that when merging the polymorphic keys, it attempts to calltraverse_errors/2
again, but since the change is now a struct instead of a changeset,traverse_errors/2
can't match, resulting in aFunctionClauseError
.