From 1d2a045da635445f5331132b1713c392ecb905fa Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Thu, 4 May 2023 08:57:48 +0700 Subject: change virtual rating to dict from string --- indoteknik_custom/models/apache_solr.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3