diff options
| -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) |
