Skip to content

Commit e056308

Browse files
committed
change formatting of condition, refs #24
1 parent 772a955 commit e056308

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

menu/menu.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,8 @@ def process(self, request):
196196
if child.visible:
197197
visible_children.append(child)
198198

199-
if getattr(
200-
settings, 'MENU_HIDE_EMPTY', False
201-
) and not self.check and not len(visible_children):
199+
hide_empty = getattr(settings, 'MENU_HIDE_EMPTY', False)
200+
if hide_empty and not self.check and not len(visible_children):
202201
self.visible = False
203202
return
204203

0 commit comments

Comments
 (0)