For links in a program to take effect there must be an active role.
Patch by: Lennard de Rijk
Reviewed by: to-be-reviewed
--- a/app/soc/views/models/program.py Sat Feb 28 17:24:37 2009 +0000
+++ b/app/soc/views/models/program.py Sat Feb 28 17:37:01 2009 +0000
@@ -256,7 +256,8 @@
# get the student entity for this user and program
filter = {'user': user,
- 'scope': program_entity}
+ 'scope': program_entity,
+ 'status': 'active'}
student_entity = student_logic.logic.getForFields(filter, unique=True)
if student_entity:
@@ -265,7 +266,8 @@
# get mentor and org_admin entity for this user and program
filter = {'user': user,
- 'program': program_entity}
+ 'program': program_entity,
+ 'status': 'active'}
mentor_entity = mentor_logic.logic.getForFields(filter, unique=True)
org_admin_entity = org_admin_logic.logic.getForFields(filter, unique=True)