Changeset 8cf11c9
- Timestamp:
- Feb 6, 2012, 4:10:36 AM (14 years ago)
- Branches:
- master, space-access, stable, stage
- Children:
- ffdfde5
- Parents:
- 1aaa525
- git-author:
- Alex Dehnert <adehnert@…> (02/06/12 04:10:36)
- git-committer:
- Alex Dehnert <adehnert@…> (02/06/12 04:10:36)
- File:
-
- 1 edited
-
asadb/groups/find_missing_transition.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
asadb/groups/find_missing_transition.py
r1aaa525 r8cf11c9 18 18 def get_roles(): 19 19 roles = [ 20 ['treasurer', 'No treasurer listed', ],21 ['financial', 'No financial signatories listed. At minimum, this should generally be your president and treasurer.', ],22 ['reservation', 'No reservation signatories listed. Members reserving space for the group should be reservation signatories.', ],20 ['treasurer', True, 'No treasurer listed', ], 21 ['financial', False, 'No financial signatories listed. At minimum, this should generally be your president and treasurer.', ], 22 ['reservation', False, 'No reservation signatories listed. Members reserving space for the group should be reservation signatories.', ], 23 23 ] 24 24 for role in roles: … … 29 29 def check_group(group, roles, ): 30 30 problems = [] 31 fail = False 31 32 if group.officer_email or group.description: 32 33 pass 33 34 else: 34 35 problems.append("No basic group information listed") 35 for role, msg in roles: 36 fail = True 37 for role, cause_fail, msg in roles: 36 38 if len(group.officers(role=role)) == 0: 37 39 problems.append(msg) 38 return problems 40 if cause_fail: fail = True 41 return fail, problems 39 42 40 43 def officers_lists(fd, ): … … 52 55 emails = [] 53 56 for group in groups.models.Group.active_groups.all(): 54 problems = check_group(group, roles, )55 if problems:57 fail, problems = check_group(group, roles, ) 58 if fail: 56 59 to = [officers[group.pk]] 57 60 if group.officer_email:
Note: See TracChangeset
for help on using the changeset viewer.