Преглед изворни кода

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

Daniel Sheffield пре 3 година
родитељ
комит
0c321bbfe0
1 измењених фајлова са 1 додато и 1 уклоњено
  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(