almightycouch / rethinkdb_ecto

RethinkDB adapter for Ecto.
https://hexdocs.pm/rethinkdb_ecto
MIT License
114 stars 18 forks source link

Filter out any nil value to avoid 'protocol Enumerable not implemente… #11

Closed Lida closed 8 years ago

Lida commented 8 years ago

…d for %Ecto.Query.Tagged' error

Lida commented 8 years ago

This PR should fix #9

almightycouch commented 8 years ago

Thank you @Lida!

Currently, your fix only applies to insert/6. Does the %Ecto.Query.Tagged error also happens on execute/6 and update/7? Should we scrum the fields there too?

Lida commented 8 years ago

I don't believe we need to do it. update/6 passes the current tests and it won't allow a nil value due to changeset validation. execute/7 is for prepared queries.