Brewtarget / brewtarget

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

New MashStep doesn't get saved properly #628

Closed matty0ung closed 2 years ago

matty0ung commented 2 years ago

Adding a new mash step to an existing recipe, the mash step gets stored in the database but not associated with the mash, so it's disappeared next time you run the program. Culprit is NamedMashEditor::addMashStep() which is directly calling ObjectStoreWrapper::insert() instead of Mash::addMashStep(), plus, MashStep::setMashId() doesn't use the same boilerplate as all the other setters, which means it's not calling down to the ObjectStore/DB layer.

Working on a fix.

matty0ung commented 2 years ago

Have made some progress. Code is no longer crashing but still two problems on recipe import from XML:

Will continue investigating!

matty0ung commented 2 years ago

Nearly there. Just have the MashSteps coming in backwards, which I know how to fix...

mattiasmaahl commented 2 years ago

Merged, closing.