Fix #851: wrong og:image url when using S3 storage

This commit is contained in:
Eliot Berriot 2019-06-10 12:06:29 +02:00
parent 9ae2c490ca
commit ce4a6b0412
No known key found for this signature in database
GPG key ID: DD6965E2476E5C27
3 changed files with 18 additions and 0 deletions

View file

@ -113,6 +113,9 @@ def chunk_queryset(source_qs, chunk_size):
def join_url(start, end):
if end.startswith("http://") or end.startswith("https://"):
# alread a full URL, joining makes no sense
return end
if start.endswith("/") and end.startswith("/"):
return start + end[1:]