Skip to content

Commit

Permalink
[#1792] Fix issue on FTS' where clause on specific fields
Browse files Browse the repository at this point in the history
We were adding the value to the where_values with no need. We ended up with
more where_values than "%s" used in the where string, which could lead to
problems.
  • Loading branch information
vitorbaptista committed Aug 6, 2014
1 parent 68fe124 commit e40324a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ckanext/datastore/plugin.py
Expand Up @@ -409,8 +409,7 @@ def _where(self, data_dict, fields_types):
if field not in fields_types:
continue
query_field = self._ts_query_alias(field)
clause_str = u'"{0}" @@ {1}'.format(field, query_field)
clause = (clause_str, value)
clause = (u'"{0}" @@ {1}'.format(field, query_field),)
clauses.append(clause)

return clauses
Expand Down

0 comments on commit e40324a

Please sign in to comment.