Browse Source

fix organic checkbox not being reset to 'mixed' state on clear

Daniel Sheffield 2 years ago
parent
commit
621e5c2e15
1 changed files with 6 additions and 1 deletions
  1. 6 1
      app/activities/PriceCheck.py

+ 6 - 1
app/activities/PriceCheck.py

@@ -46,7 +46,11 @@ class PriceCheck(FocusWidget):
     def apply_changes(self, name, value):
         if name == 'organic':
             self.data.update({
-                name: True if value == 'yes' else False
+                name: {
+                    'yes': True, 'no': False,
+                    True: True, False: False,
+                    'mixed': 'mixed'
+                }[value]
             })
         elif name in self.data:
             self.data.update({
@@ -63,6 +67,7 @@ class PriceCheck(FocusWidget):
         self.text_fields['rating'].set_text('')
         self.text_fields['spread'].set_text('')
         self.text_fields['marker'].set_text('')
+        self.text_fields['dbview'].set_text('')
         self.update()
         return self