summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2024-06-18 16:51:40 +0700
committerstephanchrst <stephanchrst@gmail.com>2024-06-18 16:51:40 +0700
commit20ae84eb89409a75b6ba024a9d9e06bdc593a480 (patch)
treecaa85be069511171430326dea9fb0b34fb05bc36
parent4b75a370a2b16d21eeb3c71007885eae4dd4112c (diff)
bf
-rw-r--r--indoteknik_custom/models/solr/apache_solr.py4
1 files 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: