From b79d2ac18d155614dab8a12cdc8226384d6b7842 Mon Sep 17 00:00:00 2001 From: Lennard de Rijk Date: Mon, 22 Jun 2009 07:32:45 +0200 Subject: [PATCH] Fixes an issue where the organization home page would throw a 505 when no projects where accepted. This only happens after the project announced deadline because only then would the project list be constructed. --- app/soc/views/models/organization.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/soc/views/models/organization.py b/app/soc/views/models/organization.py index 33eb847a..8a6c70a8 100644 --- a/app/soc/views/models/organization.py +++ b/app/soc/views/models/organization.py @@ -498,14 +498,14 @@ class View(group.View): ap_list = lists.getListContent(request, ap_params, filter, idx=0, need_content=True) - # this is a temporary fix for sorting Student Projects - # by Student name until we have a view that default - # sorts it self by name (right now we can't do such query) - ap_list['data'].sort(key=lambda sp: sp.student.name().lower()) - contents = [] if ap_list: + # this is a temporary fix for sorting Student Projects + # by Student name until we have a view that default + # sorts it self by name (right now we can't do such query) + ap_list['data'].sort(key=lambda sp: sp.student.name().lower()) + contents.append(ap_list) # construct the list and put it into the context -- 2.11.4.GIT