Brewtarget / brewtarget

Main brewtarget source code repository.
GNU General Public License v3.0
315 stars 135 forks source link

XML recipe import not setting amounts #588

Closed matty0ung closed 3 years ago

matty0ung commented 3 years ago

I've spotted a bug in the XML import of recipes. The amounts of Hops, Fermentables, etc are not always getting saved. I know why this is happening and I have a fix in mind.

mikfire commented 3 years ago

This wasn't fixed with #580 and #582?

matty0ung commented 3 years ago

I might be hallucinating, but I seemed to reproduce it with the XML recipe export that we were using to check rounding of minutes to hours. I'm pretty sure it's because I hadn't fully twigged that the amount of a Hop/Fermentable used in a particular Recipe is stored IN the Hop/Fermentable in question (which makes sense from a BeerXML point of view but is back-to-front for how things would normally be done in a relational database). I think the fix should be relatively pain-free, but I just need to fit it in around brewing and renovations!