Skip to content

Commit

Permalink
[#4236] datastore_search: distinct=true records_format=lists fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wardi authored and tino097 committed Nov 29, 2018
1 parent 625945b commit 2fa861a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ckanext/datastore/backend/postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -1230,9 +1230,9 @@ def search_data(context, data_dict):
).replace('%', '%%')
sql_fmt = u'''
SELECT '[' || array_to_string(array_agg(j.v), ',') || ']' FROM (
SELECT '[' || {select} || ']' v
SELECT {distinct} '[' || {select} || ']' v
FROM (
SELECT {distinct} * FROM "{resource}" {ts_query}
SELECT * FROM "{resource}" {ts_query}
{where} {sort} LIMIT {limit} OFFSET {offset}) as z
) AS j'''
elif records_format == u'csv':
Expand Down

0 comments on commit 2fa861a

Please sign in to comment.