Skip to content

Commit 204a84e

Browse files
committed
Fix elasticQ variable #229
1 parent 326c699 commit 204a84e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

app/views/tenders.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from django.views.generic.list import ListView
1111
from django.views.generic import TemplateView, View
1212
from django.urls import reverse
13-
from elasticsearch_dsl import Q
13+
from elasticsearch_dsl import Q as elasticQ
1414

1515
from app.documents import TenderDoc, TenderDocumentDoc, WinnerDoc
1616
from app.forms import TendersFilter
@@ -256,7 +256,7 @@ def get_context_data(self, **kwargs):
256256

257257
# Find the tenders that have documents containing the input string
258258
result_tender_documents = TenderDocumentDoc.search().query(
259-
Q(
259+
elasticQ(
260260
"multi_match",
261261
query=pk,
262262
fields=[
@@ -269,7 +269,7 @@ def get_context_data(self, **kwargs):
269269

270270
# Find the tenders that match the input string and the tender ids of the tender documents
271271
result_tenders = TenderDoc.search().query(
272-
Q(
272+
elasticQ(
273273
"multi_match",
274274
query=pk,
275275
fields=[
@@ -283,14 +283,14 @@ def get_context_data(self, **kwargs):
283283
]
284284
)
285285
|
286-
Q(
286+
elasticQ(
287287
"terms",
288288
reference=tender_references,
289289
)
290290
)
291291

292292
result_awards = WinnerDoc.search().query(
293-
Q(
293+
elasticQ(
294294
"multi_match",
295295
query=pk,
296296
fields=[

0 commit comments

Comments
 (0)