Skip to content

Commit 4696dad

Browse files
committed
Delete some unused code
- Legacy-Id: 10669
1 parent 1e75ee3 commit 4696dad

2 files changed

Lines changed: 0 additions & 24 deletions

File tree

ietf/community/templatetags/community_tags.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,8 @@
22
from django.template.loader import render_to_string
33
from django.conf import settings
44

5-
from ietf.community.models import CommunityList
6-
from ietf.group.models import Role
7-
8-
95
register = template.Library()
106

11-
@register.assignment_tag
12-
def community_lists_for_user(user):
13-
if not (user and hasattr(user, "is_authenticated") and user.is_authenticated()):
14-
return {}
15-
16-
try:
17-
person = user.person
18-
groups = []
19-
managed_areas = [i.group for i in Role.objects.filter(name__slug='ad', group__type__slug='area', group__state__slug='active', email__in=person.email_set.all())]
20-
for area in managed_areas:
21-
groups.append(CommunityList.objects.get_or_create(group=area)[0])
22-
managed_wg = [i.group for i in Role.objects.filter(name__slug='chair', group__type__slug='wg', group__state__slug__in=('active','bof'), email__in=person.email_set.all())]
23-
for wg in managed_wg:
24-
groups.append(CommunityList.objects.get_or_create(group=wg)[0])
25-
lists['group'] = groups
26-
except:
27-
pass
28-
return lists
29-
307
@register.inclusion_tag('community/display_field.html', takes_context=False)
318
def show_field(field, doc):
329
return {'field': field,

ietf/community/views.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ def untrack_document(request, name):
9595
clist = get_object_or_404(CommunityList, user=request.user)
9696

9797
if request.method == "POST":
98-
clist = CommunityList.objects.get_or_create(user=request.user)[0]
9998
clist.added_ids.remove(doc)
10099
if request.is_ajax():
101100
return HttpResponse(json.dumps({ 'success': True }), content_type='text/plain')

0 commit comments

Comments
 (0)