[ckan-changes] [okfn/ckan] f1ebfd: Add and refactor member_create tests, and raise be...
GitHub
noreply at github.com
Tue Apr 23 08:59:58 UTC 2013
Branch: refs/heads/master
Home: https://github.com/okfn/ckan
Commit: f1ebfda118f9681f11f473306cf10c743686863b
https://github.com/okfn/ckan/commit/f1ebfda118f9681f11f473306cf10c743686863b
Author: Vitor Baptista <vitor at vitorbaptista.com>
Date: 2013-04-23 (Tue, 23 Apr 2013)
Changed paths:
M ckan/logic/action/create.py
M ckan/tests/logic/test_member.py
Log Message:
-----------
Add and refactor member_create tests, and raise better exception when "id" isn't received
If "id" wasn't received, instead of throwing the seemingly unrelated error:
AttributeError: 'NoneType' object has no attribute 'id'
We now throw:
ValidationError: {u'id': u'Missing value'}
Commit: 28b54cf75adfdbcc809a39a66059be5e948fa725
https://github.com/okfn/ckan/commit/28b54cf75adfdbcc809a39a66059be5e948fa725
Author: Vitor Baptista <vitor at vitorbaptista.com>
Date: 2013-04-23 (Tue, 23 Apr 2013)
Changed paths:
M ckan/logic/action/create.py
M ckan/tests/logic/test_member.py
Log Message:
-----------
member_create accepts either the object's id or name, and have extra validations.
Even though its documentation said it accepted the object's id or name, this
wasn't the case. This is fixed now.
I've also added validations to check that the group, the object, and
object_type exists and are valid.
Now we always save the object's id in our members table, even if someone
calls member_create passing its name as obj_id.
Commit: 57b631bd652d75d8be5eda1f37571462a726eac3
https://github.com/okfn/ckan/commit/57b631bd652d75d8be5eda1f37571462a726eac3
Author: Vitor Baptista <vitor at vitorbaptista.com>
Date: 2013-04-23 (Tue, 23 Apr 2013)
Changed paths:
M ckan/logic/__init__.py
M ckan/logic/action/create.py
M ckan/logic/action/delete.py
A ckan/tests/logic/test_init.py
M ckan/tests/logic/test_member.py
Log Message:
-----------
member_delete accepts either the object's id or name, and have extra validations.
To make member_delete consistent with member_update, I've changed it to accept
either the object's id or name.
I've also added validations to check that the group, the object, and
object_type exists and are valid.
Commit: 1674cc4ed36b5c308651ccf31d4159fb433454b8
https://github.com/okfn/ckan/commit/1674cc4ed36b5c308651ccf31d4159fb433454b8
Author: Vitor Baptista <vitor at vitorbaptista.com>
Date: 2013-04-23 (Tue, 23 Apr 2013)
Changed paths:
M ckan/tests/logic/test_member.py
Log Message:
-----------
Limit lines to 80 characters
Compare: https://github.com/okfn/ckan/compare/744acce99324...1674cc4ed36b
More information about the ckan-changes
mailing list