Fix tenant func

Fixed get_tenant_func in keystone