Closed olivermt closed 3 years ago
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 3cfa502..324c691
I believe the issue is fixed, basically in the way you suggested by letting Money.new/3
take care of parsing.
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.
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?