Sfoglia il codice sorgente

bugfix use of undefined variable

Daniel Sheffield 1 anno fa
parent
commit
f1e2038901
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      app/activities/RecipeEditor.py

+ 2 - 2
app/activities/RecipeEditor.py

@@ -398,8 +398,8 @@ class RecipeEditor(FocusWidget):
                 self.notices[product] = set()
             self.notices[product].add(f"Product '{product}' not found in list of ingredients")
         for ingredient in set(ingredients) - products:
-            if product not in self.notices:
-                self.notices[product] = set()
+            if ingredient not in self.notices:
+                self.notices[ingredient] = set()
             self.notices[ingredient].add(f"Ingredient '{ingredient}' is not used")
         if len(set(ingredients)) != len(ingredients):
             self.notices[None].add("Some ingredients listed more than once")