[ckan-changes] commit/ckan: 2 new changesets

Bitbucket commits-noreply at bitbucket.org
Wed Jun 29 09:34:07 UTC 2011


2 new changesets in ckan:

http://bitbucket.org/okfn/ckan/changeset/eb85dcddea08/
changeset:   eb85dcddea08
user:        dread
date:        2011-06-29 11:32:06
summary:     [doc][xs]: Fixed title that was at top level.
affected #:  1 file (6 bytes)

--- a/doc/deployment.rst	Tue Jun 28 16:31:50 2011 +0200
+++ b/doc/deployment.rst	Wed Jun 29 11:32:06 2011 +0200
@@ -239,7 +239,7 @@
 
 
 Upgrade
-=======
+-------
 
 Ideally production deployments are upgraded with fabric, but here are the manual instructions.
 
@@ -274,7 +274,7 @@
 
    $ sudo /etc/init.d/apache2 restart
 
-7. You could manually try CKAN works in a browser, or better still run the smoke tests found in ckanext/blackbox. To do this, install ckanext and run ckanext from another machine - see ckanext README.txt for instructions: https://bitbucket.org/okfn/ckanext and then run::
+7. You could manually try CKAN in a browser, or better still run the smoke tests found in ckanext/blackbox. To do this, install ckanext and run ckanext from another machine - see ckanext README.txt for instructions: https://bitbucket.org/okfn/ckanext and then run::
 
    $ python blackbox/smoke.py blackbox/ckan.net.profile.json
 


http://bitbucket.org/okfn/ckan/changeset/44fd85a17748/
changeset:   44fd85a17748
user:        dread
date:        2011-06-29 11:33:06
summary:     [lib]: Fix for bool search option error handling - non-bool was giving ValueError which was not caught and therefore 500 error.
affected #:  2 files (456 bytes)

--- a/ckan/lib/search/common.py	Wed Jun 29 11:32:06 2011 +0200
+++ b/ckan/lib/search/common.py	Wed Jun 29 11:33:06 2011 +0200
@@ -146,7 +146,10 @@
     def validate(self):
         for key, value in self.items():
             if key in self.BOOLEAN_OPTIONS:
-                value = asbool(value)
+                try:
+                    value = asbool(value)
+                except ValueError:
+                    raise SearchError('Value for search option %r must be True or False (1 or 0) but received %r' % (key, value))
             elif key in self.INTEGER_OPTIONS:
                 try:
                     value = int(value)


--- a/ckan/tests/functional/api/test_package_search.py	Wed Jun 29 11:32:06 2011 +0200
+++ b/ckan/tests/functional/api/test_package_search.py	Wed Jun 29 11:33:06 2011 +0200
@@ -206,6 +206,12 @@
         assert anna_rec['ratings_average'] == 3.0, anna_rec['ratings_average']
         assert anna_rec['ratings_count'] == 1, anna_rec['ratings_count']
 
+    def test_08_all_fields_syntax_error(self):
+        offset = self.base_url + '?all_fields=should_be_boolean' # invalid all_fields value
+        res = self.app.get(offset, status=400)
+        assert('boolean' in res.body)
+        assert('all_fields' in res.body)
+
     def test_09_just_tags(self):
         offset = self.base_url + '?tags=russian&all_fields=1'
         res = self.app.get(offset, status=200)

Repository URL: https://bitbucket.org/okfn/ckan/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.




More information about the ckan-changes mailing list