File tree 2 files changed +3
-1
lines changed
2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -703,6 +703,8 @@ class Group(models.Model):
703
703
def __str__ (self ):
704
704
return self .title
705
705
706
+ def active_project_child_groups (self ):
707
+ return self .group_set .filter (dataproject__isnull = False , dataproject__visible = True ).distinct ()
706
708
707
709
################################################################################
708
710
# Deprecated models
Original file line number Diff line number Diff line change 214
214
< li class ="dropdown ">
215
215
< a class ="dropdown-toggle " data-toggle ="dropdown " href ="# "> {{ group.navigation_title|default:group.title }} < span class ="caret "> </ span > </ a >
216
216
< ul class ="dropdown-menu " aria-labelledby ="{{ group.navigation_title|default:group.title }} ">
217
- {% for child in group.group_set.all %}
217
+ {% for child in group.active_project_child_groups %}
218
218
{% url 'group' child.key as group_url %}
219
219
< li class ="nav-item{% if request.path == group_url or child.key == navigation.active_group.key %} active{% endif %} "> < a class ="nav-link " href ="{{ group_url }} "> {{ child.navigation_title|default:child.title }}</ a > </ li >
220
220
{% endfor %}
You can’t perform that action at this time.
0 commit comments