Closed TartesDaJulia closed 2 years ago
Weird. Will look at this soon. In my use I definitely have values > 99 in ingredient amount fields 🤔
Found out editing a food's serving size above 99 leads to a 500 server error, maybe it is connected?
Ok -- I can indeed reproduce this on the demo. Just not on my own instance of the app. Interesting...
Here's what the full error message looks like --
SQLSTATE[22003]: Numeric value out of range: 7 ERROR: numeric field overflow DETAIL: A field with precision 10, scale 8 must round to an absolute value less than 10^2. (SQL: update "ingredient_amounts" set "amount" = 200, "updated_at" = 2021-11-01 01:50:51 where "id" = 81)
I think I have messed up precision for that field and its just not enforced on SQLite (what my instance uses).
This is fixed on main
-- thanks for reporting!
Hate to bother, but any chance for this 0.8.1 to be released? I think that I'm running into this as the USDA provides measurements often in portions of 100g.
Trying to edit a recipe and adding above 99 grams of something gives error:
SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'amount' at row 1 (SQL: update
ingredient_amounts
setamount
= 100,ingredient_amounts
.updated_at
= 2021-10-31 15:03:27 whereid
= 7)