cloud_platform: fix default config

`_config_by_server_env` should always retutn a `PlatformConfig` instance
This commit is contained in:
Simone Orsi committed 2020-02-04 11:42:35 +01:00
1 parent 20c0138588
commit ec6f8ee541
1 file changed
+4 -1
+4 -1
View File
@@ -33,6 +33,9 @@ class FilestoreKind(object):
file = 'file'
DefaultConfig = PlatformConfig(filestore=FilestoreKind.db)
class CloudPlatform(models.AbstractModel):
_name = 'cloud.platform'
_description = 'cloud.platform'
@@ -49,7 +52,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
def _get_running_env(self):
environment_name = config['running_env']
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.