[ckan-changes] [ckan/ckan] f59c91: [#1725] Refactor search_data()'s sort to accept an...

GitHub noreply at github.com
Tue May 27 13:17:19 UTC 2014


  Branch: refs/heads/1725-extend-datastore
  Home:   https://github.com/ckan/ckan
  Commit: f59c914cfd9b4898fa9938471c772945fcbb984f
      https://github.com/ckan/ckan/commit/f59c914cfd9b4898fa9938471c772945fcbb984f
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2014-05-27 (Tue, 27 May 2014)

  Changed paths:
    M ckanext/datastore/db.py

  Log Message:
  -----------
  [#1725] Refactor search_data()'s sort to accept an array

We'll need this to allow extensions to add new clauses to it.


  Commit: aa82afc577e90f6744eb869fb2f76fb75c4bbeeb
      https://github.com/ckan/ckan/commit/aa82afc577e90f6744eb869fb2f76fb75c4bbeeb
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2014-05-27 (Tue, 27 May 2014)

  Changed paths:
    M ckanext/datastore/db.py

  Log Message:
  -----------
  [#1725] Catch exception thrown when there's no toolkit.request

I have changed this on 3fed29c, but got the following traceback:

```
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/usr/lib/ckan/default/src/ckan/ckanext/datastore/tests/test_interface.py", line 74, in test_filters_sent_arent_modified
    filters=filters.copy())
  File "/usr/lib/ckan/default/src/ckan/ckan/new_tests/helpers.py", line 91, in call_action
    return logic.get_action(action_name)(context=context, data_dict=kwargs)
  File "/usr/lib/ckan/default/src/ckan/ckan/logic/__init__.py", line 414, in wrapped
    result = _action(context, data_dict, **kw)
  File "/usr/lib/ckan/default/src/ckan/ckan/logic/__init__.py", line 530, in wrapper
    return action(context, data_dict)
  File "/usr/lib/ckan/default/src/ckan/ckanext/datastore/logic/action.py", line 339, in datastore_search
    result = db.search(context, data_dict)
  File "/usr/lib/ckan/default/src/ckan/ckanext/datastore/db.py", line 1141, in search
    return search_data(context, data_dict)
  File "/usr/lib/ckan/default/src/ckan/ckanext/datastore/db.py", line 947, in search_data
    _insert_links(data_dict, limit, offset)
  File "/usr/lib/ckan/default/src/ckan/ckanext/datastore/db.py", line 848, in _insert_links
    urlstring = toolkit.request.environ['CKAN_CURRENT_URL']
  File "/usr/lib/ckan/default/src/ckan/ckan/lib/maintain.py", line 75, in custom__getattr__
    depricated = __old_getattr__(self, '__depricated_properties__')
  File "/usr/local/lib/python2.7/dist-packages/paste/registry.py", line 137, in __getattr__
    return getattr(self._current_obj(), attr)
  File "/usr/local/lib/python2.7/dist-packages/paste/registry.py", line 197, in _current_obj
    'thread' % self.____name__)
TypeError: No object (name: request) has been registered for this thread
```


Compare: https://github.com/ckan/ckan/compare/99cc09240ada...aa82afc577e9


More information about the ckan-changes mailing list