Parcourir la source

bugfix translating yes/no to true/false

Daniel Sheffield il y a 3 ans
Parent
commit
10f4742c46
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      grocery_transactions.py

+ 1 - 1
grocery_transactions.py

@@ -184,7 +184,7 @@ class GroceryTransactionEditor(urwid.WidgetPlaceholder):
         unit = data['unit']
         price = data['price']
         product = data['product']
-        organic = data['organic'] if data['organic'] else 'false'
+        organic = 'true' if data['organic'] == 'yes' else 'false'
         statement = \
             f"CALL insert_transaction('{ts}', $store${store}$store$, " \
             f"$descr${description}$descr$, {quantity}, $unit${unit}$unit$, " \