Open matty0ung opened 2 years ago
Thanks for the additional info. You're right that it's a separate problem. Your DB shouldn't get in this state. There are two things I'd like to investigate:
hop
table can mean either "a hop" or "a use of a hop in a recipe". In the latter case, there's also an entry in the hop_in_recipe
table plus a link back to the original hop via the hop_children
table. If you have one hop
row referenced by two separate recipes then you may get odd things happening if/when you change the amount of hop or delete it from one of the recipes.This probably isn't a super-quick fix unless we can work out a set of actions that reproduce the state on a clean DB.
Transferred from https://github.com/Brewtarget/brewtarget/issues/656. Following reported by @dsheets4. My thoughts in next comment.
Perhaps only for posterity, as I'm not sure what else to do with this. There was one interesting behavior, which I expect would be a different ticket anyway but also could just be specific to my database. I did what amounts to copy/pasting steps from one recipe to another to test. That is, add an instruction to one recipe, click to a different recipe, open that recipe's Brewday tab, copy text from an instruction there, then return to the original recipe's Brewday tab, select the earlier created instruction, paste that text into that instruction, then click back into the instruction list, the display then flips to Recipe tab. I'm not sure all those steps are necessary... When it flips to the Recipe tab there are WARNING messages printed to the log that seem to indicate perhaps something is off with my database (see below). I did the same steps with a fresh BrewTarget database using the Bt: recipes and that works just fine. I'm not sure what the warning means. For example, fermentable 858 only appears in the fermentable_in_recipe table once for recipe 104. Recipe 104 is the one to which I was adding instructions. I also seem to have 6 rows in the database for that recipe, all but 104 flagged as locked. This might be an artifact of moving the recipe between folders.
Originally posted by @dsheets4 in https://github.com/Brewtarget/brewtarget/issues/656#issuecomment-1219041392