Skip to content

Commit 3773eaa

Browse files
authoredApr 26, 2024·
Merge pull request #669 from hms-dbmi/HYP-302
HYP 302
2 parents 3533147 + 82d3916 commit 3773eaa

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed
 

‎app/projects/models.py

+2
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,8 @@ class Group(models.Model):
703703
def __str__(self):
704704
return self.title
705705

706+
def active_project_child_groups(self):
707+
return self.group_set.filter(dataproject__isnull=False, dataproject__visible=True).distinct()
706708

707709
################################################################################
708710
# Deprecated models

‎app/templates/base.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@
214214
<li class="dropdown">
215215
<a class="dropdown-toggle" data-toggle="dropdown" href="#">{{ group.navigation_title|default:group.title }} <span class="caret"></span></a>
216216
<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 %}
218218
{% url 'group' child.key as group_url %}
219219
<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>
220220
{% endfor %}

0 commit comments

Comments
 (0)
Please sign in to comment.