mirror of
https://github.com/camptocamp/odoo-cloud-platform.git
synced 2026-06-23 18:04:34 +00:00
Merge pull request #147 from grindtildeath/13.0_dev_attachments
[13.0]Require AWS_BUCKETNAME for prod, integration and labs environments only
This commit is contained in:
@@ -103,7 +103,8 @@ class CloudPlatform(models.AbstractModel):
|
||||
"SWIFT_PASSWORD environment variable is required when "
|
||||
"ir_attachment.location is 'swift'."
|
||||
)
|
||||
container_name = os.environ.get('SWIFT_WRITE_CONTAINER')
|
||||
container_name = os.environ.get('SWIFT_WRITE_CONTAINER', '')
|
||||
if environment_name in ('prod', 'integration', 'labs'):
|
||||
assert container_name, (
|
||||
"SWIFT_WRITE_CONTAINER environment variable is required when "
|
||||
"ir_attachment.location is 'swift'.\n"
|
||||
@@ -166,7 +167,8 @@ class CloudPlatform(models.AbstractModel):
|
||||
"AWS_SECRET_ACCESS_KEY environment variable is required when "
|
||||
"ir_attachment.location is 's3'."
|
||||
)
|
||||
bucket_name = os.environ.get('AWS_BUCKETNAME')
|
||||
bucket_name = os.environ.get('AWS_BUCKETNAME', '')
|
||||
if environment_name in ('prod', 'integration', 'labs'):
|
||||
assert bucket_name, (
|
||||
"AWS_BUCKETNAME environment variable is required when "
|
||||
"ir_attachment.location is 's3'.\n"
|
||||
|
||||
Reference in New Issue
Block a user