app/soc/views/models/student_project.py
changeset 2640 da8aa1ff6943
parent 2637 0ae090b18a5e
child 2685 506cda0463e8
equal deleted inserted replaced
2639:9b05c44316f9 2640:da8aa1ff6943
   454               'scope': entity.scope,
   454               'scope': entity.scope,
   455               'status': 'active'}
   455               'status': 'active'}
   456     mentor = mentor_logic.logic.getForFields(fields, unique=True)
   456     mentor = mentor_logic.logic.getForFields(fields, unique=True)
   457 
   457 
   458     # add this mentor to the additional mentors
   458     # add this mentor to the additional mentors
   459     # pylint: disable-msg=E1103
       
   460     if not entity.additional_mentors:
   459     if not entity.additional_mentors:
   461       additional_mentors = [mentor.key()]
   460       additional_mentors = [mentor.key()]
   462     else:
   461     else:
   463       additional_mentors = additional_mentors.append(mentor.key())
   462       additional_mentors = entity.additional_mentors
       
   463       additional_mentors.append(mentor.key())
   464 
   464 
   465     fields = {'additional_mentors': additional_mentors}
   465     fields = {'additional_mentors': additional_mentors}
   466     project_logic.updateEntityProperties(entity, fields)
   466     project_logic.updateEntityProperties(entity, fields)
   467 
   467 
   468     # redirect to the same page
   468     # redirect to the same page