diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-08-24 09:17:29 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-08-24 09:17:29 +0700 |
| commit | b173abf78bd52ba0cd10829e1a2b31efc371f3cf (patch) | |
| tree | db2318154308ab8d65a7b8e403c3a457f4151599 /indoteknik_custom/models/apache_solr.py | |
| parent | b8356524ab2d381affe438a85e1662a08fcd3026 (diff) | |
Refactor update solr sync
Diffstat (limited to 'indoteknik_custom/models/apache_solr.py')
| -rw-r--r-- | indoteknik_custom/models/apache_solr.py | 4 |
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 {} |
