File tree 1 file changed +3
-5
lines changed
1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 16
16
TrigramSimilarity ,
17
17
)
18
18
from django .core .cache import cache
19
- from django .db import models , transaction , connection
19
+ from django .db import connection , models , transaction
20
20
from django .db .models import Prefetch , Q
21
21
from django .db .models .fields .json import KeyTextTransform
22
22
from django .utils .functional import cached_property
@@ -180,7 +180,7 @@ def sync_to_db(self, decoded_documents):
180
180
with connection .cursor () as cursor :
181
181
cursor .execute (
182
182
"SELECT EXISTS(SELECT 1 FROM pg_ts_config WHERE cfgname = %s)" ,
183
- [english ]
183
+ [english ],
184
184
)
185
185
has_custom_english_config = cursor .fetchone ()[0 ]
186
186
@@ -209,9 +209,7 @@ def sync_to_db(self, decoded_documents):
209
209
path = document_path ,
210
210
title = html .unescape (strip_tags (document ["title" ])),
211
211
metadata = document ,
212
- config = language_mapping .get (
213
- self .lang [:2 ], DEFAULT_TEXT_SEARCH_CONFIG
214
- ),
212
+ config = language_mapping .get (self .lang [:2 ], DEFAULT_TEXT_SEARCH_CONFIG ),
215
213
)
216
214
for document in self .documents .all ():
217
215
document .metadata ["breadcrumbs" ] = list (
You can’t perform that action at this time.
0 commit comments