app/soc/views/helper/list_info.py
changeset 2202 f6a1c141f51e
parent 2077 fd2e83a297c7
child 2206 4daf85a152ca
--- a/app/soc/views/helper/list_info.py	Sat Apr 18 11:41:56 2009 +0000
+++ b/app/soc/views/helper/list_info.py	Sat Apr 18 12:07:02 2009 +0000
@@ -22,20 +22,20 @@
   ]
 
 
-def getStudentProposalInfo(ranking, assigned_proposals):
+def getStudentProposalInfo(ranking, proposals_keys):
   """Returns a function that returns information about the rank and assignment.
   
   Args:
-    ranking: dict with a mapping from Student Proposal to rank
-    assigned_proposals: list of proposals assigned a slot
+    ranking: dict with a mapping from Student Proposal key to rank
+    proposals_keys: list of proposal keys assigned a slot
   """
 
   def wrapper(item, _):
     """Decorator wrapper method.
     """
-    info = {'rank': ranking[item]}
+    info = {'rank': ranking[item.key()]}
 
-    if item in assigned_proposals:
+    if item.key() in proposals_keys:
       info['item_class'] =  'selected'
     else:
       info['item_class'] =  'normal'