diff --git a/ckan/lib/dictization/model_dictize.py b/ckan/lib/dictization/model_dictize.py index 309350e5c24..1e1475ebfd2 100644 --- a/ckan/lib/dictization/model_dictize.py +++ b/ckan/lib/dictization/model_dictize.py @@ -79,6 +79,7 @@ def extras_list_dictize(extras_list, context): def resource_dictize(res, context): resource = table_dictize(res, context) + resource['format'] = resource.get('format','').lower() extras = resource.pop("extras", None) if extras: resource.update(extras) diff --git a/ckan/logic/action/get.py b/ckan/logic/action/get.py index edd56409190..3a6eed93a57 100644 --- a/ckan/logic/action/get.py +++ b/ckan/logic/action/get.py @@ -625,7 +625,7 @@ def format_autocomplete(context, data_dict): .order_by('total DESC')\ .limit(limit) - return [resource.format for resource in query] + return [resource.format.lower() for resource in query] def user_autocomplete(context, data_dict): '''Returns users containing the provided string'''