fix some errors in participant

This commit is contained in:
Oskar Hahn 2012-08-08 10:52:13 +02:00
parent d1ab2f2e85
commit 75443808af
3 changed files with 9 additions and 9 deletions

View File

@ -412,7 +412,7 @@ class AssignmentPDF(PDFView):
# Add result rows
elected_candidates = assignment.elected.all()
elected_candidates = list(assignment.elected)
for candidate, poll_list in vote_results.iteritems():
row = []

View File

@ -77,11 +77,11 @@
<tr class="{% cycle '' 'odd' %}">
<td>{{ user.first_name }}</td>
<td>{{ user.last_name }}</td>
<td>{{ user.profile.group }}</td>
<td>{{ user.profile.get_type_display }}</td>
<td>{{ user.profile.committee }}</td>
<td>{{ user.openslidesuser.name_surfix }}</td>
<td>{{ user.openslidesuser.get_type_display }}</td>
<td>{{ user.openslidesuser.committee }}</td>
{% if perms.participant.can_manage_participant %}
<td>{{ user.profile.comment|first_line }}</td>
<td>{{ user.openslidesuser.comment|first_line }}</td>
<td>{% if user.last_login > user.date_joined %}
{{ user.last_login }}
{% endif %}</td>

View File

@ -83,7 +83,7 @@ def get_overview(request):
openslidesuser__gender__iexact=sortfilter['gender'][0])
if 'group' in sortfilter:
query = query.filter(
openslidesuser__group__iexact=sortfilter['name_surfix'][0])
openslidesuser__name_surfix__iexact=sortfilter['group'][0])
if 'type' in sortfilter:
query = query.filter(
openslidesuser__type__iexact=sortfilter['type'][0])
@ -315,11 +315,11 @@ def group_edit(request, group_id=None):
group = form.save()
try:
django_group = DjangoGroup.objects.get(group=group)
except DjangoGroup.DoesNotExist:
openslides_group = OpenSlidesGroup.objects.get(group=group)
except OpenSlidesGroup.DoesNotExist:
django_group = None
if form.cleaned_data['as_user'] and django_group is None:
DjangoGroup(group=group).save()
OpenSlidesGroup(group=group).save()
elif not form.cleaned_data['as_user'] and django_group:
django_group.delete()