[ckan-dev] FW: WebApp Error: <type 'exceptions.KeyError'>: 'id'

Adrià Mercader adria.mercader at okfn.org
Fri Jul 4 10:06:31 UTC 2014


On 3 July 2014 23:55, Jeff Socia <JSocia at drcog.org> wrote:

> This is version 2.2. Is there any chance that you would be available to
> assist in make a hot-fix of this?



As Nigel mentions 2.2.1 should be out soon, in the meantime you can apply
the attached patch.
Download it to the ckan source folder, and run:

git apply 1505.diff


Hope this helps,

Adrià
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20140704/07b6e020/attachment-0003.html>
-------------- next part --------------
diff --git a/ckan/logic/auth/create.py b/ckan/logic/auth/create.py
index 0c7be8d..e9082fc 100644
--- a/ckan/logic/auth/create.py
+++ b/ckan/logic/auth/create.py
@@ -121,8 +121,8 @@ def user_create(context, data_dict=None):
             'create users')}
     return {'success': True}
 
-def user_invite(context, data_dict=None):
-    context['id'] = context.get('group_id')
+def user_invite(context, data_dict):
+    data_dict['id'] = data_dict['group_id']
     return group_member_create(context, data_dict)
 
 def _check_group_auth(context, data_dict):


More information about the ckan-dev mailing list