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.
--- a/app/soc/views/models/organization.py Sun Jun 21 18:27:30 2009 +0200
+++ b/app/soc/views/models/organization.py Mon Jun 22 07:32:45 2009 +0200
@@ -498,14 +498,14 @@
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