Fix dashboard nav, when panelgroup empty

The identity dashboard breaks with a common pattern
and doesn't use a panel group to group panels. When not
using accordion navigation, the last level of navigation is
not shown at all.

Change-Id: Ic76611009eac30658d0af082b0e46cd8f2da1832
Closes-Bug: #1391524
This commit is contained in:
Matthias Runge 2014-11-11 14:47:47 +01:00
parent 9f904e3935
commit 8e3950a19c
1 changed files with 4 additions and 1 deletions

View File

@ -116,7 +116,10 @@ def horizon_dashboard_nav(context):
panel.can_access(context)):
allowed_panels.append(panel)
if allowed_panels:
non_empty_groups.append((group.name, allowed_panels))
if group.name is None:
non_empty_groups.append((dashboard.name, allowed_panels))
else:
non_empty_groups.append((group.name, allowed_panels))
return {'components': SortedDict(non_empty_groups),
'user': context['request'].user,