Fix Google API credentials without storage section raises exception on import (issue #331)

This commit is contained in:
allegroai 2021-04-20 18:07:05 +03:00
parent 8658198f8b
commit 8c309afef4

View File

@ -242,8 +242,8 @@ class GSBucketConfigurations(BaseBucketConfigurations):
config_list = gs_configuration.get("credentials", [])
buckets_configs = [GSBucketConfig(**entry) for entry in config_list]
default_project = gs_configuration.get("project") or {}
default_credentials = gs_configuration.get("credentials_json") or default_credentials
default_project = gs_configuration.get("project", None) or {}
default_credentials = gs_configuration.get("credentials_json", None) or default_credentials
return cls(buckets_configs, default_project, default_credentials)