Explorar o código

improve messaging

Pi %!s(int64=2) %!d(string=hai) anos
pai
achega
79b54e8992
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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()}"