Skip to content

fix validation type coercion for comparison queries in issue #7#8

Merged
weixiyen merged 1 commit intoblitzstudios:masterfrom
pablohirafuji:master
Apr 23, 2018
Merged

fix validation type coercion for comparison queries in issue #7#8
weixiyen merged 1 commit intoblitzstudios:masterfrom
pablohirafuji:master

Conversation

@pablohirafuji
Copy link
Contributor

Hey, the issue is only when comparing :text type fields. It does not happen when the field is :bigint or :timestamp because it does not pass through this validation:
defp coerced_value(value, :text) when not is_binary(value), do: to_string(value)

It was passing the list parameter directly to:
defp coerced_value(value, _), do: value
because it doesn't have a case that match when is_list on the coerced_value function. Only :text because lists are a not is_binary match.

@weixiyen weixiyen merged commit c066bad into blitzstudios:master Apr 23, 2018
@weixiyen
Copy link
Collaborator

Thank you for the fix! Will update to 0.2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants