]> git.parisson.com Git - teleforma.git/commitdiff
Fix absolute URLs
authorGuillaume Pellerin <yomguy@parisson.com>
Thu, 28 Jun 2018 22:27:47 +0000 (00:27 +0200)
committerGuillaume Pellerin <yomguy@parisson.com>
Thu, 28 Jun 2018 22:27:47 +0000 (00:27 +0200)
teleforma/exam/models.py

index 9fbf6bb3eaac9ca71becd1fa3e9ec55390d85457..700bf714e48f4632778bd787e4d9773477785f3f 100644 (file)
@@ -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):