소스 검색

fix organic check box not working

Daniel Sheffield 3 년 전
부모
커밋
b49e90a660
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      app/activities/TransactionEditor.py

+ 2 - 2
app/activities/TransactionEditor.py

@@ -61,7 +61,7 @@ class TransactionEditor(FocusWidget):
         })
 
     def apply_organic_state(self, w, state):
-        self.data['organic'] = repr(state).lower()
+        self.data['organic'] = 'yes' if state is True else 'no'
 
     def clear(self):
         for k in self.data:
@@ -79,7 +79,7 @@ class TransactionEditor(FocusWidget):
                 date or None, store or None
             ) else ''
         )
-        self.organic_checkbox.set_state(True if self.data['organic'] == 'true' else False)
+        self.organic_checkbox.set_state(True if self.data['organic'] == 'yes' else False)
         return self
 
     def focus_on_product(self):