From: Guillaume Pellerin Date: Thu, 28 Jun 2018 22:27:47 +0000 (+0200) Subject: Fix absolute URLs X-Git-Tag: 1.3^2 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=874eaa5942cfcf2601b40bb323ff3cb21303c7a9;p=teleforma.git Fix absolute URLs --- diff --git a/teleforma/exam/models.py b/teleforma/exam/models.py index 9fbf6bb3..700bf714 100644 --- a/teleforma/exam/models.py +++ b/teleforma/exam/models.py @@ -387,17 +387,13 @@ class Script(BaseResource): def safe_url(self): domain = Site.objects.get_current().domain url = self.url - if 'pilotsystems' in domain: - url = url.replace('http://e-learning.crfpa.pre-barreau.com', '//'+domain) - - url = url.replace('http://', '//') + url = url.replace('http://e-learning.crfpa.pre-barreau.com', '//' + domain) return urllib.quote(url) def unquoted_url(self): domain = Site.objects.get_current().domain url = self.url - if 'pilotsystems' in domain: - url = url.replace('http://e-learning.crfpa.pre-barreau.com', '//'+domain) + url = url.replace('http://e-learning.crfpa.pre-barreau.com', '//' + domain) return url def has_annotations_file(self):