Explorar el Código

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

Daniel Sheffield hace 3 años
padre
commit
0c321bbfe0
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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(