# HG changeset patch # User Lennard de Rijk # Date 1245648765 -7200 # Node ID 32cb30846cfd8b9ec6276821ac47c2b0ea5341cc # Parent d286202a1039bb480be2f46aa947242504a9bcfb 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. diff -r d286202a1039 -r 32cb30846cfd app/soc/views/models/organization.py --- 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