Skip to content

Commit a94a715

Browse files
committed
🎨 fix formatting
1 parent 335a89d commit a94a715

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

‎fragdenstaat_de/fds_cms/templatetags/fds_cms_tags.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from django import template
22
from django.conf import settings
33

4-
from cms.models import StaticPlaceholder, Page
4+
from cms.models import Page, StaticPlaceholder
55

66
from ..responsive_images import (
77
ResponsiveImage,
@@ -78,17 +78,18 @@ def get_soft_root(page):
7878
return soft_root
7979
return page.get_root()
8080

81+
8182
@register.simple_tag(takes_context=True)
8283
def get_breadcrumb_ancestor(context, navigation_node):
8384
print(context)
8485
if navigation_node == None:
8586
return
86-
87+
8788
try:
8889
request = context["request"]
8990
except KeyError:
9091
return
91-
92+
9293
page = Page.objects.get(pk=navigation_node.id)
9394

9495
try:
@@ -99,12 +100,12 @@ def get_breadcrumb_ancestor(context, navigation_node):
99100

100101
if ancestor == None:
101102
return
102-
103+
103104
if only_upwards and request.current_page != page:
104105
return
105106

106107
title = ancestor.get_title(language=request.LANGUAGE_CODE)
107108
url = ancestor.get_absolute_url(language=request.LANGUAGE_CODE)
108109
icon = ancestor.fdspageextension.icon
109110

110-
return {"title": title, "url": url, "icon": icon}
111+
return {"title": title, "url": url, "icon": icon}

0 commit comments

Comments
 (0)