0
0
Fork 0
mirror of https://github.com/healthchecks/healthchecks.git synced 2025-04-11 15:51:19 +00:00

Fix project names in the top navigation dropdown menu, avoid duplicates.

This commit is contained in:
Pēteris Caune 2019-01-19 19:08:06 +02:00
parent e98bd42438
commit c42a854e75
No known key found for this signature in database
GPG key ID: E28D7679E9A9EDE2
2 changed files with 2 additions and 2 deletions
hc/accounts
templates/accounts

View file

@ -12,7 +12,7 @@ class TeamAccessMiddleware(object):
is_owner = Q(owner=request.user)
is_member = Q(member__user_id=request.user.id)
projects_q = Project.objects.filter(is_owner | is_member)
projects_q = Project.objects.filter(is_owner | is_member).distinct()
projects_q = projects_q.select_related("owner")
request.get_projects = lambda: list(projects_q)

View file

@ -324,7 +324,7 @@
class="form-control"
id="team-name"
name="team_name"
value="{{ profile }}">
value="{{ project }}">
</div>
</div>
</div>