# HG changeset patch # User Lennard de Rijk # Date 1237327380 0 # Node ID 1ec8574394991da5bbccee6d4526866420f73a88 # Parent 77c726b969162d1de279fab3f5213d7da1388335 Proposal data is now stored in a list rather then a dictionary for the AssignedProposals JSON object. As requested by Mario. Patch by: Lennard de Rijk Reviewed by: to-be-reviewed diff -r 77c726b96916 -r 1ec857439499 app/soc/views/models/program.py --- a/app/soc/views/models/program.py Tue Mar 17 20:51:07 2009 +0000 +++ b/app/soc/views/models/program.py Tue Mar 17 22:03:00 2009 +0000 @@ -411,7 +411,7 @@ org_entities = org_logic.logic.getForFields(fields, limit=limit, offset=offset) orgs_data = {} - proposals_data = {} + proposals_data = [] # for each org get the proposals who will be assigned a slot for org in org_entities: @@ -457,13 +457,14 @@ for proposal in student_proposal_entities: student_entity = proposal.scope - proposals_data[proposal.key().name()] = { + proposals_data.append( + {'key_name': proposal.key().name(), 'proposal_title': proposal.title, 'student_key': student_entity.key().name(), 'student_name': student_entity.name(), 'student_contact': student_entity.email, 'org_key': org.key().name() - } + }) # return all the data in JSON format data = {'orgs': orgs_data,