Fixed an error occuring when assigning more then one secondary mentors.
authorLennard de Rijk <ljvderijk@gmail.com>
Tue, 14 Jul 2009 00:55:05 +0200
changeset 2640 da8aa1ff6943
parent 2639 9b05c44316f9
child 2641 7ad3af6d30bd
Fixed an error occuring when assigning more then one secondary mentors.
app/soc/views/models/student_project.py
--- a/app/soc/views/models/student_project.py	Mon Jul 13 23:08:14 2009 +0200
+++ b/app/soc/views/models/student_project.py	Tue Jul 14 00:55:05 2009 +0200
@@ -456,11 +456,11 @@
     mentor = mentor_logic.logic.getForFields(fields, unique=True)
 
     # add this mentor to the additional mentors
-    # pylint: disable-msg=E1103
     if not entity.additional_mentors:
       additional_mentors = [mentor.key()]
     else:
-      additional_mentors = additional_mentors.append(mentor.key())
+      additional_mentors = entity.additional_mentors
+      additional_mentors.append(mentor.key())
 
     fields = {'additional_mentors': additional_mentors}
     project_logic.updateEntityProperties(entity, fields)