From 03ef1701a695a6fb1e01dd1ca467a7460af7a710 Mon Sep 17 00:00:00 2001
From: Todd Dembrey <todd.dembrey@torchbox.com>
Date: Thu, 6 Sep 2018 17:37:51 +0100
Subject: [PATCH] Correctly split the url

---
 opentech/storage_backends.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/opentech/storage_backends.py b/opentech/storage_backends.py
index 2acf70c95..82b84f92e 100644
--- a/opentech/storage_backends.py
+++ b/opentech/storage_backends.py
@@ -35,7 +35,7 @@ class PrivateMediaStorage(S3Boto3Storage):
         if hasattr(settings, 'AWS_PRIVATE_CUSTOM_DOMAIN'):
             # Django storage doesn't handle custom domains with auth strings
             custom_domain = settings.AWS_PRIVATE_CUSTOM_DOMAIN
-            parts = list(url.split(url))
+            parts = list(parse.urlsplit(url))
             parts[0:3] = self.url_protocol, custom_domain, filepath_to_uri(name)
             return parse.urlunsplit(parts)
 
-- 
GitLab