diff --git a/ietf/community/templatetags/community_tags.py b/ietf/community/templatetags/community_tags.py index ee1ab0099..8cbfe3061 100644 --- a/ietf/community/templatetags/community_tags.py +++ b/ietf/community/templatetags/community_tags.py @@ -2,31 +2,8 @@ from django import template from django.template.loader import render_to_string from django.conf import settings -from ietf.community.models import CommunityList -from ietf.group.models import Role - - register = template.Library() -@register.assignment_tag -def community_lists_for_user(user): - if not (user and hasattr(user, "is_authenticated") and user.is_authenticated()): - return {} - - try: - person = user.person - groups = [] - 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())] - for area in managed_areas: - groups.append(CommunityList.objects.get_or_create(group=area)[0]) - 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())] - for wg in managed_wg: - groups.append(CommunityList.objects.get_or_create(group=wg)[0]) - lists['group'] = groups - except: - pass - return lists - @register.inclusion_tag('community/display_field.html', takes_context=False) def show_field(field, doc): return {'field': field, diff --git a/ietf/community/views.py b/ietf/community/views.py index 0b2f41a1c..88bf4a7e9 100644 --- a/ietf/community/views.py +++ b/ietf/community/views.py @@ -95,7 +95,6 @@ def untrack_document(request, name): clist = get_object_or_404(CommunityList, user=request.user) if request.method == "POST": - clist = CommunityList.objects.get_or_create(user=request.user)[0] clist.added_ids.remove(doc) if request.is_ajax(): return HttpResponse(json.dumps({ 'success': True }), content_type='text/plain')