diff libervia/pages/lists/view/_browser/__init__.py @ 1430:0f3038f3a954

browser (lists/view): fix status check in grocery list following `value` property fix in template_xmlui.OptionsWidget
author Goffi <goffi@goffi.org>
date Fri, 04 Jun 2021 14:45:49 +0200
parents 6fdef01f6671
children 106bae41f5c8
line wrap: on
line diff
--- a/libervia/pages/lists/view/_browser/__init__.py	Fri May 07 15:38:34 2021 +0200
+++ b/libervia/pages/lists/view/_browser/__init__.py	Fri Jun 04 14:45:49 2021 +0200
@@ -88,13 +88,13 @@
             f"Can't get item status: {e}",
             level="error"
         )
-        status = ["to_buy"]
-    if status == ["to_buy"]:
-        item["status"] = ["bought"]
+        status = "to_buy"
+    if status == "to_buy":
+        item["status"] = "bought"
         class_update_method = item_elt.classList.add
         checked = True
-    elif status == ["bought"]:
-        item["status"] = ["to_buy"]
+    elif status == "bought":
+        item["status"] = "to_buy"
         checked = False
         class_update_method = item_elt.classList.remove
     else: