fix: handle scenario with no condition
diff --git a/erpnext/portal/product_configurator/utils.py b/erpnext/portal/product_configurator/utils.py
index 9c0120d..2220892 100644
--- a/erpnext/portal/product_configurator/utils.py
+++ b/erpnext/portal/product_configurator/utils.py
@@ -335,11 +335,13 @@
filter_condition = get_conditions(filters, 'and')
- where_conditions = 'disabled = 0 and '
-
- where_conditions += ' and '.join(
+ where_conditions = ' and '.join(
[condition for condition in [show_in_website_condition, search_condition, filter_condition] if condition]
)
+ if where_conditions:
+ where_conditions += ' and disabled = 0'
+ else:
+ where_conditions += 'disabled = 0'
left_joins = []
for f in filters: