Skip to content

Commit

Permalink
Merge pull request #230 from eaudeweb/229_fix_elasticq_variable
Browse files Browse the repository at this point in the history
Fix elasticQ variable #229
  • Loading branch information
alexneamtu authored Oct 8, 2019
2 parents 326c699 + 204a84e commit 2da1667
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/views/tenders.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from django.views.generic.list import ListView
from django.views.generic import TemplateView, View
from django.urls import reverse
from elasticsearch_dsl import Q
from elasticsearch_dsl import Q as elasticQ

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

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

# Find the tenders that match the input string and the tender ids of the tender documents
result_tenders = TenderDoc.search().query(
Q(
elasticQ(
"multi_match",
query=pk,
fields=[
Expand All @@ -283,14 +283,14 @@ def get_context_data(self, **kwargs):
]
)
|
Q(
elasticQ(
"terms",
reference=tender_references,
)
)

result_awards = WinnerDoc.search().query(
Q(
elasticQ(
"multi_match",
query=pk,
fields=[
Expand Down

0 comments on commit 2da1667

Please sign in to comment.