[ckan-changes] [ckan/ckan] 6f8a0c: [#1894] Fix convert_to_extras to allow use with no...
GitHub
noreply at github.com
Thu Aug 21 14:12:00 UTC 2014
Branch: refs/heads/1894-use-extras-and-convert_to_extras
Home: https://github.com/ckan/ckan
Commit: 6f8a0cadd784440c0d1d8b8d76ca5f7e03800260
https://github.com/ckan/ckan/commit/6f8a0cadd784440c0d1d8b8d76ca5f7e03800260
Author: amercader <amercadero at gmail.com>
Date: 2014-08-21 (Thu, 21 Aug 2014)
Changed paths:
M ckan/logic/converters.py
A ckan/new_tests/lib/navl/test_converters.py
Log Message:
-----------
[#1894] Fix convert_to_extras to allow use with normal extras
`convert_to_extras` was adding the custom fields in an unflattened way
during validation to the object that would be later unflattened. This
worked fine if there were only `convert_to_extras` fields, but not if
you were also providing actual extras, eg
data_dict = {
'name': 'test-dataset',
'custom_text': 'Hi',
'custom_text2': 'Hi2',
'extras': [
{'key': 'proper_extra', 'value': 'Bye'},
]
}
This fixes the `convert_to_extras` output and adds new converters test for it.
More information about the ckan-changes
mailing list