From b173abf78bd52ba0cd10829e1a2b31efc371f3cf Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Thu, 24 Aug 2023 09:17:29 +0700 Subject: Refactor update solr sync --- indoteknik_custom/models/apache_solr.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indoteknik_custom/models/apache_solr.py') 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 {} -- cgit v1.2.3