Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Style improvements

Pacu27627c52ea4e9
diff --git a/saleor/core/templatetags/urls.py b/saleor/core/templatetags/urls.py
index 3991c8786f..847bd8cfb3 100644
--- a/saleor/core/templatetags/urls.py
+++ b/saleor/core/templatetags/urls.py
@@ -8,4 +8,3 @@ register = template.Library()
@register.simple_tag
def build_absolute_uri(request, location):
return request.build_absolute_uri(location)
-
diff --git a/saleor/core/utils/__init__.py b/saleor/core/utils/__init__.py
index 307ea28399..db3e5ca426 100644
--- a/saleor/core/utils/__init__.py
+++ b/saleor/core/utils/__init__.py
@@ -38,7 +38,8 @@ class CategoryChoiceField(forms.ModelChoiceField):
def build_absolute_uri(location):
# type: (str, bool, saleor.site.models.SiteSettings) -> str
host = Site.objects.get_current().domain
- current_uri = '%s://%s' % ('https' if settings.ENABLE_SSL else 'http', host)
+ protocol = 'https' if settings.ENABLE_SSL else 'http'
+ current_uri = '%s://%s' % (protocol, host)
location = urljoin(current_uri, location)
return iri_to_uri(location)