def contribute(self, data, context):
    if data:
        try:
            roles = api.keystone.role_list(self.workflow.request)
        except Exception:
            exceptions.handle(self.workflow.request, _('Unable to retrieve user list.'))
        post = self.workflow.request.POST
        for role in roles:
            field = self.get_member_field_name(role.id)
            context[field] = post.getlist(field)
    return context
def contribute(self, data, context):
    if data:
        try:
            roles = api.keystone.role_list(self.workflow.request)
        except Exception:
            exceptions.handle(self.workflow.request, _('Unable to retrieve user list.'))
        post = self.workflow.request.POST
        for role in roles:
            field = self.get_member_field_name(role.id)
            context[field] = post.getlist(field)
    return context