summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-11-29 14:03:16 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-11-29 14:03:16 +0700
commita17ec171fbc6f21f64df00df9d6781b4d4559790 (patch)
tree69ae7f9c2a0ef11c2615b961b53abb9bea853070
parentfe3a1e350736fa581b433fcc7241aad44ab994d1 (diff)
<iman> back to code is in bu product template
-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 e29c6d39..87e8370f 100644
--- a/indoteknik_custom/models/solr/product_template.py
+++ b/indoteknik_custom/models/solr/product_template.py
@@ -77,7 +77,7 @@ class ProductTemplate(models.Model):
('location_id', 'in', target_locations),
])
- is_in_bu = True if template.qty_free_bandengan > 0 else False
+ is_in_bu = any(quant.available_quantity > 0 for quant in stock_quant)
cleaned_desc = BeautifulSoup(template.website_description or '', "html.parser").get_text()
website_description = template.website_description if cleaned_desc else ''