diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2024-07-29 14:04:40 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2024-07-29 14:04:40 +0700 |
| commit | 9f283edb1d4809d1d7152e437a714de2ab6e54c8 (patch) | |
| tree | 007e089c65b758cbb24ba3f841d5ea419ce5c463 | |
| parent | 76f0ba4ad6cab452abf68ca7aa817b2398b4fecf (diff) | |
fix pasti hemat
| -rw-r--r-- | indoteknik_custom/models/solr/product_template.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/indoteknik_custom/models/solr/product_template.py b/indoteknik_custom/models/solr/product_template.py index 19143be3..8130b50e 100644 --- a/indoteknik_custom/models/solr/product_template.py +++ b/indoteknik_custom/models/solr/product_template.py @@ -99,12 +99,12 @@ class ProductTemplate(models.Model): 'sni_b': template.unpublished, 'tkdn_b': template.unpublished, "qty_sold_f": template.qty_sold, - # "voucher_pastihemat" : { - # "min_purchase" : voucher.min_purchase_amount, - # "discount_type" : voucher.discount_type, - # "discount_amount" : voucher.discount_amount, - # "max_discount" : voucher.max_discount_amount - # } + "voucher_pastihemat" : { + "min_purchase" : voucher.min_purchase_amount or 0, + "discount_type" : voucher.discount_typeor or '', + "discount_amount" : voucher.discount_amount or 0, + "max_discount" : voucher.max_discount_amount or 0 + } }) self.solr().add(docs=[document], softCommit=True) |
