app/soc/views/models/program.py
changeset 2106 2131c4b05ca3
parent 2080 6c4cf7ae18d8
child 2107 855daf131060
--- a/app/soc/views/models/program.py	Mon Apr 06 22:55:08 2009 +0000
+++ b/app/soc/views/models/program.py	Mon Apr 06 22:55:27 2009 +0000
@@ -292,15 +292,9 @@
     mentors = {}
 
     for org in organizations:
-      filter = {
-          'org': org,
-          'status': ['new', 'pending']
-          }
       orgs[org.link_id] = org
-      query = student_proposal_logic.logic.getQueryForFields(filter=filter)
-      proposals = student_proposal_logic.logic.getAll(query)
-      applications[org.link_id] = len(proposals)
-      mentors[org.link_id] = len([i for i in proposals if i.mentor != None])
+      applications[org.link_id] = org.nr_applications
+      mentors[org.link_id] = org.nr_mentors
 
     # TODO: Use configuration variables here
     max_slots_per_org = 40