diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-10-28 10:07:00 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-10-28 10:07:00 +0700 |
| commit | 5bb681f2975a3fb38fcd87c89f72d18c6e794170 (patch) | |
| tree | bd828d091ce25fe791dda198a7c723df61d2000f | |
| parent | 6777edb758fb29981a0baac663b1388a820cded8 (diff) | |
Bug fix condition sync product price to solr
| -rw-r--r-- | indoteknik_custom/models/solr/product_template.py | 2 |
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 |
