cloud_platform: fix default config

`_config_by_server_env` should always retutn a `PlatformConfig` instance
This commit is contained in:
Simone Orsi
2020-02-04 13:40:33 +01:00
parent 5b8804ffc0
commit 3b17357e57
+4 -1
View File
@@ -34,6 +34,9 @@ class FilestoreKind(object):
file = 'file'
DefaultConfig = PlatformConfig(filestore=FilestoreKind.db)
class CloudPlatform(models.AbstractModel):
_name = 'cloud.platform'
_description = 'cloud.platform'
@@ -64,7 +67,7 @@ class CloudPlatform(models.AbstractModel):
None
)
configs = configs_getter() if configs_getter else {}
return configs.get(environment) or FilestoreKind.db
return configs.get(environment) or DefaultConfig
# Due to the addition of the ovh cloud platform
# This will be moved to cloud_platform_exoscale on v11