diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2023-09-08 11:24:15 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2023-09-08 11:24:15 +0700 |
| commit | 3bf156fdc669bc57d729f2574f44a4beb4b7b79e (patch) | |
| tree | c03a92f06c0a1da80139862928984a0fccbaad2f | |
| parent | 12770546a41f846f721d32c296a598315c30b80b (diff) | |
add attributes to api product
| -rw-r--r-- | indoteknik_custom/models/solr/apache_solr.py | 2 | ||||
| -rw-r--r-- | indoteknik_custom/models/solr/product_product.py | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/indoteknik_custom/models/solr/apache_solr.py b/indoteknik_custom/models/solr/apache_solr.py index 518280ac..f05357bf 100644 --- a/indoteknik_custom/models/solr/apache_solr.py +++ b/indoteknik_custom/models/solr/apache_solr.py @@ -23,7 +23,7 @@ class ApacheSolr(models.Model): if env == 'development': url = 'http://192.168.23.5:8983/solr/' elif env == 'production': - url = 'http://10.148.0.5:8983/solr/' + url = 'http://34.101.189.218:8983/solr/' return pysolr.Solr(url + schema, always_commit=True, timeout=30) diff --git a/indoteknik_custom/models/solr/product_product.py b/indoteknik_custom/models/solr/product_product.py index 88ab8dd5..54b098e5 100644 --- a/indoteknik_custom/models/solr/product_product.py +++ b/indoteknik_custom/models/solr/product_product.py @@ -152,6 +152,7 @@ class ProductProduct(models.Model): 'stock': doc.get('stock_total_f'), 'weight': doc.get('weight_f'), 'manufacture': None, + 'attributes': [x.name for x in product.product_template_attribute_value_ids], 'is_flashsale': True if flashsale else False } |
