From 6ed2316f6aa446bcd5bc7e6cd4d0c0a1136096dd Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Tue, 29 Aug 2023 10:41:22 +0700 Subject: Update apache solr - Create get tier name pricelist - Create solr results on product.template and product.product - Fix get active flash sale on product template - Update name "get_single_doc" to "get_doc" in apache solr model - Add product ids on sync category homepage to solr --- indoteknik_custom/models/solr/apache_solr.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indoteknik_custom/models/solr/apache_solr.py') diff --git a/indoteknik_custom/models/solr/apache_solr.py b/indoteknik_custom/models/solr/apache_solr.py index cb44e7ed..3be37a5a 100644 --- a/indoteknik_custom/models/solr/apache_solr.py +++ b/indoteknik_custom/models/solr/apache_solr.py @@ -27,7 +27,7 @@ class ApacheSolr(models.Model): return pysolr.Solr(url + schema, always_commit=True, timeout=30) - def get_single_doc(self, schema, id): + def get_doc(self, schema, id): try: return self.connect(schema).search(f'id:{id}').docs[0] except: @@ -53,7 +53,6 @@ class ApacheSolr(models.Model): new_dict[cleaned_key] = value return new_dict - def _update_stock_product_to_solr(self, limit=10000): current_time = datetime.now() delta_time = current_time - timedelta(days=3) -- cgit v1.2.3