# HG changeset patch # User Lennard de Rijk # Date 1241552926 -7200 # Node ID ebc4931f0762208f37c2767bda51064f0c4ed3b6 # Parent 8566fb2b8012f33846b56a57718b3d55af52b05c Fixed typo in docstring as to comments on r3012 (svn repo). Also now importing logic and using keyword arguments as to comply with the codebase standards Patch by: Lennard de Rijk Reviewed by: to-be-reviewed diff -r 8566fb2b8012 -r ebc4931f0762 app/soc/views/models/organization.py --- a/app/soc/views/models/organization.py Mon May 04 19:23:44 2009 +0200 +++ b/app/soc/views/models/organization.py Tue May 05 21:48:46 2009 +0200 @@ -422,14 +422,14 @@ def _getMapData(self, student_project_params, filter=None): """Constructs the JSON object required to generate a - google map on organization home page. + Google map on organization home page. Args: - student_project_logic: logic for student_project to obtain entities + student_project_params: params for student project view filter: a dict for the properties that the entities should have Returns: - A json object containing map data with the following structure. + A JSON object containing map data with the following structure. [ { 'type': 'mentor', @@ -449,14 +449,15 @@ } ] """ - student_project_logic = student_project_params['logic'] + + from soc.logic.models.student_project import logic as student_project_logic map_data = [] mentors = {} student_only = [] # get all the student_project entities for this organization - student_project_entities = student_project_logic.getForFields(filter) + student_project_entities = student_project_logic.getForFields(filter=filter) # construct a dictionary of mentors. For each mentor construct a # list of 3-tuple containing student, project title and url. This is