Role NoneType object has no attribute setdefault

Havana Keystone configured with LDAP.

When you try to update a role using the API:

curl -X PATCH --insecure -H "X-Auth-Token:the_token" -H
"Content-type:
application/json" -d '{"role": {"name": "the new name"}}'
https://localhost:35357/v3/roles/role_id

Keystone server raises an error:

{"error": {"message": "An unexpected error prevented the server from
fulfilling your request. 'NoneType' object has no attribute
'setdefault'", "code": 500, "title": "Internal Server Error"}}

The role information is updated, but keystone server raises that
error.

Closes-Bug: #1247830

Change-Id: I686e40e42371f6e2cea55110554456a33939799c
Merge "Role NoneType object has no attribute setdefault"