Skip to content

Commit 0704687

Browse files
committed
Only show officers in the graph. Remove unused funciton. Fix minor html thing
1 parent bc452e2 commit 0704687

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

hknweb/templates/admin/candidate/bitbyte_group_change_list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% extends "admin/change_list.html" %}
2-
{% load i18n admin_urls %}
2+
{% load admin_urls %}
33

44
{% block object-tools-items %}
55
{# This button only shows up on the BitByteGroup list page #}

hknweb/views/bitbyte_tree.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,7 @@
44
from hknweb.utils import allow_public_access, login_and_committee
55
from django.conf import settings
66
from django.http import JsonResponse
7-
from django.contrib.auth.models import User
8-
9-
10-
@login_and_committee(settings.COMPSERV_GROUP)
11-
def update_bitbyte_tree(request):
12-
return
7+
from django.contrib.auth.models import User, Group
138

149

1510
@allow_public_access
@@ -19,9 +14,10 @@ def bitbyte_tree_data(request):
1914
username_to_node = {}
2015
links = []
2116

17+
officer_group = Group.objects.get(name=settings.OFFICER_GROUP)
2218
for group in groups:
2319
group_bytes = group.bytes.all()
24-
group_bits = group.bits.all()
20+
group_bits = group.bits.filter(groups=officer_group)
2521

2622
def add_to_nodes(user_list):
2723
for user in user_list:

0 commit comments

Comments
 (0)