From 33e6fc960fc3dcdbb77eedbff6239b7763ace468 Mon Sep 17 00:00:00 2001 From: Mqdd Date: Thu, 18 Dec 2025 10:52:43 +0700 Subject: fix query --- indoteknik_custom/models/keywords.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indoteknik_custom/models/keywords.py b/indoteknik_custom/models/keywords.py index e0c7705c..69ecdd46 100644 --- a/indoteknik_custom/models/keywords.py +++ b/indoteknik_custom/models/keywords.py @@ -83,8 +83,8 @@ class Keywords(models.Model): JOIN product_public_category_product_template_rel rel ON rel.product_template_id = pt.id WHERE - pp.active = true - AND COALESCE(pt.product_rating, 0) >= 8 + COALESCE(pt.product_rating, 0) >= 3 + AND (pt.unpublished IS FALSE OR pt.unpublished IS NULL) AND ( pt.name ILIKE %s OR COALESCE(pt.website_description, '') ILIKE %s -- cgit v1.2.3