equal
deleted
inserted
replaced
61 Args: |
61 Args: |
62 entity: a Mentor entity |
62 entity: a Mentor entity |
63 |
63 |
64 """ |
64 """ |
65 |
65 |
66 from soc.logic.models.student_project import logic as student_project_logic |
66 from soc.logic.models.student_project import logic as \ |
67 from soc.logic.models.student_proposal import logic as student_proposal_logic |
67 student_project_logic |
|
68 from soc.logic.models.student_proposal import logic as \ |
|
69 student_proposal_logic |
68 |
70 |
69 fields = {'mentor': entity} |
71 fields = {'mentor': entity} |
70 |
72 |
71 student_project_entity = student_project_logic.getForFields(fields, |
73 student_project_entity = student_project_logic.getForFields(fields, |
72 unique=True) |
74 unique=True) |
86 |
88 |
87 When status is changed to invalid, removes the Mentor from all Student |
89 When status is changed to invalid, removes the Mentor from all Student |
88 Proposals possible mentor lists. |
90 Proposals possible mentor lists. |
89 """ |
91 """ |
90 |
92 |
91 from soc.logic.models.student_proposal import logic as student_proposal_logic |
93 from soc.logic.models.student_proposal import logic \ |
|
94 as student_proposal_logic |
92 |
95 |
93 value = entity_properties[name] |
96 value = entity_properties[name] |
94 |
97 |
95 if name == 'status' and value != entity.status and value == 'invalid': |
98 if name == 'status' and value != entity.status and value == 'invalid': |
96 fields = {'org': entity.scope} |
99 fields = {'org': entity.scope} |