Quellcode durchsuchen

Revert attempt to inital attempts to fix empty string being written for 'organic' and correct the root cause

Daniel Sheffield vor 3 Jahren
Ursprung
Commit
0c321bbfe0
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      grocery_transactions.py

+ 1 - 1
grocery_transactions.py

@@ -580,7 +580,7 @@ class GroceryTransactionEditor(urwid.WidgetPlaceholder):
         unit = self.data['unit']
         price = self.data['price']
         product = self.data['product']
-        organic = 'true' if self.data['organic'] else 'false'
+        organic = self.data['organic'] if self.data['organic'] else 'false'
         log = f"{time.strftime(fmt, ts_log)}-{store}.txn"
         with open(log, 'a') as f:
             f.write(