Fix use of aws where hostname is not required

This fixes an error with endpoint computed as https://None while
we want to let boto compute the AWS endpoint
This commit is contained in:
Yannick Vaucher
2019-04-17 14:51:46 +02:00
parent c3310cbd9f
commit 8ccddefd06
+1 -1
View File
@@ -49,7 +49,7 @@ class IrAttachment(models.Model):
host = os.environ.get('AWS_HOST')
# Ensure host is prefixed with a scheme (use https as default)
if not urlsplit(host).scheme:
if host and not urlsplit(host).scheme:
host = 'https://%s' % host
region_name = os.environ.get('AWS_REGION')