From 20ae84eb89409a75b6ba024a9d9e06bdc593a480 Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Tue, 18 Jun 2024 16:51:40 +0700 Subject: bf --- indoteknik_custom/models/solr/apache_solr.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indoteknik_custom/models/solr/apache_solr.py b/indoteknik_custom/models/solr/apache_solr.py index 1c4b7114..6560c9b5 100644 --- a/indoteknik_custom/models/solr/apache_solr.py +++ b/indoteknik_custom/models/solr/apache_solr.py @@ -306,10 +306,10 @@ class ApacheSolr(models.Model): 'default_code_s': variant.default_code or '', 'product_rating_f': variant.product_tmpl_id.virtual_rating or 0, 'template_id_i': variant.product_tmpl_id.id or 0, - 'active': variant.active or False, + 'active_s': str(variant.active) or 'false', 'type_s': variant.product_tmpl_id.type or '', } - # variant.write({'solr_flag': 1}) # Ensure the flag is updated correctly + variant.write({'solr_flag': 1}) # Ensure the flag is updated correctly documents.append(document) catch = document except Exception as e: -- cgit v1.2.3