Просмотр исходного кода

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

Daniel Sheffield 3 лет назад
Родитель
Сommit
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(