Skip to content

Commit

Permalink
Fixed error in checking TermsQuery
Browse files Browse the repository at this point in the history
  • Loading branch information
Alberto Paro committed Feb 15, 2011
1 parent 3ec8d94 commit c07ddc0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pyes/query.py
Expand Up @@ -344,6 +344,7 @@ def add(self, filter):
combined with an ANDFilter.
"""
from pyes.filters import Filter
if isinstance(filter, Filter):
self.filters.append(filter)
else:
Expand Down Expand Up @@ -808,7 +809,7 @@ def __init__(self, *args, **kwargs):
super(TermsQuery, self).__init__(*args, **kwargs)

def add(self, field, value, minimum_match=1):
if isinstance(value, list):
if not isinstance(value, list):
raise InvalidParameterQuery("value %r must be valid list" % value)
self._values[field] = value
if minimum_match:
Expand Down

0 comments on commit c07ddc0

Please sign in to comment.