summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/solr/product_template.py
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2023-10-31 10:39:29 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2023-10-31 10:39:29 +0700
commit3cc65898e703c4857908b97bc5ab63c8452be684 (patch)
treeac0465f78da9c0efdd4f9acf72aec3d529f6db78 /indoteknik_custom/models/solr/product_template.py
parent0831511787b1cd2171d6dd1dd6c2c9da46b64d2e (diff)
parentd426ff142df8b5778398e3b460ff03d02d9e368a (diff)
Merge branch 'production' into cr/auth
# Conflicts: # indoteknik_custom/__manifest__.py
Diffstat (limited to 'indoteknik_custom/models/solr/product_template.py')
-rw-r--r--indoteknik_custom/models/solr/product_template.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/indoteknik_custom/models/solr/product_template.py b/indoteknik_custom/models/solr/product_template.py
index 2bbcab9c..648a0625 100644
--- a/indoteknik_custom/models/solr/product_template.py
+++ b/indoteknik_custom/models/solr/product_template.py
@@ -137,7 +137,7 @@ class ProductTemplate(models.Model):
price_tier = price_doc.get(f"{price_tier_key}_f", 0)
# When price tier is 0 or variant_price less than price tier then use variant price
- if price_tier == 0 or variant_price < price_tier:
+ if price_tier == 0 or (variant_price < price_tier and variant_price > 0):
price_doc[f"{discount_tier_key}_f"] = variant_discount
price_doc[f"{price_tier_key}_f"] = variant_price