diff --git a/caso/extract/manager.py b/caso/extract/manager.py index b437d33..d2bc47d 100644 --- a/caso/extract/manager.py +++ b/caso/extract/manager.py @@ -131,8 +131,6 @@ def projects(self): def _get_keystone_client(self, project=None, system_scope="all"): """Get a Keystone Client to get the projects that we will use.""" - if project: - system_scope = None client = keystone_client.get_client( CONF, project=project, system_scope=system_scope ) diff --git a/caso/keystone_client.py b/caso/keystone_client.py index 5954b39..75d1b2e 100644 --- a/caso/keystone_client.py +++ b/caso/keystone_client.py @@ -37,6 +37,8 @@ def get_session(conf, project, system_scope=None): """Get an auth session.""" # First try using project_id + if project: + system_scope = None auth_plugin = loading.load_auth_from_conf_options( conf, CFG_GROUP, project_id=project, system_scope=system_scope )