瀏覽代碼

improve messaging

Pi 2 年之前
父節點
當前提交
79b54e8992
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/activities/RecipeEditor.py

+ 1 - 1
app/activities/RecipeEditor.py

@@ -325,7 +325,6 @@ class RecipeEditor(FocusWidget):
                     continue
 
                 self.found[product] = '~'
-                notice += f"Product '{product} (organic={organic})' not found in database\n"
                 df = self.query_manager.get_historic_prices_data(unit, sort=sort, product=product, organic=None)
                 if df.empty:
                     self.found[product] = '>'
@@ -337,6 +336,7 @@ class RecipeEditor(FocusWidget):
                     self.found[product] = '>'
                     continue
                 df = df.dropna()
+                notice += f"Using {'non-' if organic else ''}organic {product}\n"
 
             assert len(df['avg'].unique()) == 1, f"There should be only one average price: {df['avg'].unique()}"