From 7bb9b007bbd124fec25add9cfcaffed17dca515f Mon Sep 17 00:00:00 2001 From: Jay Parmar Date: Sun, 21 Sep 2025 09:53:20 +0530 Subject: [PATCH] fix: handle IndexError during install --- ls_shop/www/products/list.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ls_shop/www/products/list.py b/ls_shop/www/products/list.py index de579d1..a4acd7c 100644 --- a/ls_shop/www/products/list.py +++ b/ls_shop/www/products/list.py @@ -24,7 +24,7 @@ def get_filter_brands(filters=None): query = query.select(item.brand).distinct().orderby(item.brand) brands = query.run(pluck=True) print(brands) - if not brands[0]: + if not brands or not brands[0]: return [] brands = [b.title() for b in brands] return brands