summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/apache_solr.py
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2023-08-24 09:17:29 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2023-08-24 09:17:29 +0700
commitb173abf78bd52ba0cd10829e1a2b31efc371f3cf (patch)
treedb2318154308ab8d65a7b8e403c3a457f4151599 /indoteknik_custom/models/apache_solr.py
parentb8356524ab2d381affe438a85e1662a08fcd3026 (diff)
Refactor update solr sync
Diffstat (limited to 'indoteknik_custom/models/apache_solr.py')
-rw-r--r--indoteknik_custom/models/apache_solr.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/indoteknik_custom/models/apache_solr.py b/indoteknik_custom/models/apache_solr.py
index 974718a5..bd4dd3dc 100644
--- a/indoteknik_custom/models/apache_solr.py
+++ b/indoteknik_custom/models/apache_solr.py
@@ -16,9 +16,9 @@ class ApacheSolr(models.Model):
_name = 'apache.solr'
_order = 'id desc'
- def get_single_doc(self, solr, id):
+ def get_single_doc(self, schema, id):
try:
- return solr.search(f'id:{id}').docs[0]
+ return self.connect(schema).search(f'id:{id}').docs[0]
except:
return {}