diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2023-11-24 16:51:02 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2023-11-24 16:51:02 +0700 |
| commit | 1a27ae4f9ec137d7af69175afb67a094873738b9 (patch) | |
| tree | f900acff28a45289507da57e473af5231faaf881 | |
| parent | 3e6c8343e93d7126f4002a23e396f22db7667774 (diff) | |
add new condition on publish_b solr
| -rw-r--r-- | indoteknik_custom/models/solr/product_product.py | 2 | ||||
| -rw-r--r-- | indoteknik_custom/models/solr/product_template.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/indoteknik_custom/models/solr/product_product.py b/indoteknik_custom/models/solr/product_product.py index 03eaaf13..ebfa8e65 100644 --- a/indoteknik_custom/models/solr/product_product.py +++ b/indoteknik_custom/models/solr/product_product.py @@ -65,7 +65,7 @@ class ProductProduct(models.Model): 'search_rank_weekly_i': variant.product_tmpl_id.search_rank_weekly, 'attributes': [x.name for x in variant.product_template_attribute_value_ids], 'has_product_info_b': True, - 'publish_b': not variant.unpublished, + 'publish_b': not variant.unpublished or not variant.active, 'qty_sold_f': variant.qty_sold }) diff --git a/indoteknik_custom/models/solr/product_template.py b/indoteknik_custom/models/solr/product_template.py index 648a0625..123a95ac 100644 --- a/indoteknik_custom/models/solr/product_template.py +++ b/indoteknik_custom/models/solr/product_template.py @@ -82,7 +82,7 @@ class ProductTemplate(models.Model): "category_name": category_name, "description_t": template.website_description or '', 'has_product_info_b': True, - 'publish_b': not template.unpublished, + 'publish_b': not template.unpublished or not template.active, "qty_sold_f": template.qty_sold }) |
