You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ValidationError: {'info': {'params': [()], 'statement': ['\\n SELECT array_to_json(array_agg(j))::text FROM (\\n SELECT "_id" as "_id", to_json(to_char("created", \\'YYYY-MM-DD"T"HH24:MI:SS\\')) as "created", to_json(to_char("changed", \\'YYYY-MM-DD"T"HH24:MI:SS\\')) as "changed", "country" as "country", "iso3" as "iso3", "year" as "year", "start_date" as "start_date", "end_date" as "end_date", "government_agency_name" as "government_agency_name", "gfs_code" as "gfs_code", "gfs_description" as "gfs_description", "name_of_revenue_stream" as "name_of_revenue_stream", "currency_code" as "currency_code", "currency_rate" as "currency_rate", "value_reported" as "value_reported", "value_reported_as_USD" as "value_reported_as_USD", "reporting_url" as "reporting_url"\\n FROM "ee6c62b8-1ccf-42e2-8df2-04d5daaa6ed8" \\n ORDER BY "changed" asc LIMIT 10 OFFSET 0\\n ) AS j'], 'orig': ['could not identify an ordering operator for type json\\nLINE 5: ORDER BY "changed" asc LIMIT 10 OFFSET 0\\n ^\\nHINT: Use an explicit ordering operator or modify the query.\\n']}, 'query': ['Invalid query']},
selected stack entries:
ckan | [Tue Jul 10 11:10:18.823897 2018] [:error] [pid 7142:tid 139994056292096] [client 127.0.0.1:43296] File '/usr/lib/ckan/default/src/ckan/ckanext/datatablesview/controller.py', line 50 in ajax,
ckan | [Tue Jul 10 11:10:18.824018 2018] [:error] [pid 7142:tid 139994056292096] [client 127.0.0.1:43296] File '/usr/lib/ckan/default/src/ckan/ckanext/datastore/logic/action.py', line 469 in datastore_search,
Core issue appears to be in the datastore, when returning json data it encodes specific fields as a json type to format them properly, but that json type is not sortable in the database. I think the problem here is that they're aliasing the name of the returned (formatted) column to the name of the underlying database column, and not qualifying or casting the sort. All of this is core ckan.
Looks like this is: ckan/ckan#4288 and will be in ckan 2.7.5. We should update when it's available.
Filtering does not work on the
changed
andcreated
columns. Returns a js error.See: https://www.resourcedata.org/dataset/eiti-complete-summary-table/resource/4e4462a5-6029-4ae3-a4cc-66ad6ccc6d70?filters=
The text was updated successfully, but these errors were encountered: