changeset 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 01936fc55cd9
children 7472d5a88006
files libervia/pages/lists/view/_browser/__init__.py
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
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: