-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Composite type cast does not respect locales #11
Comments
Thanks for the report. And apologies for the slow response - I'm not getting issue notifications from GitHub for this repo it seems. As of |
Awesome! Whats your release schedule for this? Is it possible to backport into a tag and get a new minor version out? |
I've published ex_money version 5.5.0 and ex_money_sql version 1.4.0. Does that work for you? If you have version constraint and are looking for a back port, just let me know and I'll see what I can do. It's midnight my timezone now so I may not get to it for another few hours. Apologies again for the slow response, I think I've fixed GitHub notifications now. |
No not at all, I for some reason thought you didnt release a new version. |
There is only one test case currently that uses exactly your example but I think covers the issue. I was waiting to see if there was any feedback on a new feature added in |
The perpetrator is here:
https://github.com/kipcole9/money_sql/blob/master/lib/money/ecto/money_ecto_composite_type.ex#L52
The step trying to parse Decimal is unneccessary as Money does its own validation (which is also Locale aware).
So it will error out on invalid decimals (unknown strings or float source) and as such should not require this extra step with the with clause.
It's a pretty trivial change, do you just wanna plop the code change in and release new version or do you want me to send a PR?
The text was updated successfully, but these errors were encountered: