Change query for assignments in personal_info_widget

This commit is contained in:
Norman Jäckel 2012-10-26 17:14:46 +02:00
parent 510aca54eb
commit 1063e7011a

View File

@ -531,7 +531,9 @@ def get_personal_info_widget(request):
'submitted_motions': Motion.objects.filter(submitter=request.user), 'submitted_motions': Motion.objects.filter(submitter=request.user),
'config_motion_min_supporters': config['motion_min_supporters'], 'config_motion_min_supporters': config['motion_min_supporters'],
'supported_motions': Motion.objects.filter(motionsupporter=request.user), 'supported_motions': Motion.objects.filter(motionsupporter=request.user),
'assignments': [ assignment for assignment in Assignment.objects.all() if assignment.is_candidate(request.user) ],} 'assignments': Assignment.objects.filter(
assignmentcandidate__person=request.user,
assignmentcandidate__blocked=False),}
return Widget( return Widget(
name='personal_info', name='personal_info',
display_name=_('On You'), display_name=_('On You'),