app/soc/views/models/organization.py
changeset 2418 32cb30846cfd
parent 2390 723dfa4811e8
child 2573 f09f317769c4
--- 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