diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2023-05-04 08:57:48 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2023-05-04 08:57:48 +0700 |
| commit | 1d2a045da635445f5331132b1713c392ecb905fa (patch) | |
| tree | fcc5207808bf592d2239a2dbd8ddc657f99d4886 | |
| parent | afad42a0a2c19339158499a259bef5bb7062f387 (diff) | |
change virtual rating to dict from string
| -rw-r--r-- | indoteknik_custom/models/apache_solr.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/indoteknik_custom/models/apache_solr.py b/indoteknik_custom/models/apache_solr.py index ce6a4180..b59f95cc 100644 --- a/indoteknik_custom/models/apache_solr.py +++ b/indoteknik_custom/models/apache_solr.py @@ -29,9 +29,10 @@ class ApacheSolr(models.Model): ], limit=limit) documents=[] for template in templates: + rating = {"set":template.virtual_rating} document = { "id": template.id, - "product_rating_f": {"set":template.virtual_rating} + "product_rating_f": rating } documents.append(document) template.last_calculate_rating = current_time |
