From: Tony Mack Date: Mon, 3 Aug 2009 20:18:52 +0000 (+0000) Subject: expect user records to only have 1 public key X-Git-Tag: sfa-0.9-1~129 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=17950ff880745077f43cffad6c7d32c972cc4d97;p=sfa.git expect user records to only have 1 public key --- diff --git a/sfa/methods/register.py b/sfa/methods/register.py index 9f5d019f..d92437b7 100644 --- a/sfa/methods/register.py +++ b/sfa/methods/register.py @@ -49,8 +49,8 @@ class register(Method): if 'gid' not in record: uuid = create_uuid() pkey = Keypair(create=True) - if 'keys' in record and record['keys']: - pkey = convert_public_key(record['keys'][0]) + if 'keys' in record and record['key']: + pkey = convert_public_key(record['key']) gid_object = self.api.auth.hierarchy.create_gid(name, uuid, pkey) gid = gid_object.save_to_string(save_parents=True)