Skip to content

Commit e286947

Browse files
Check if user is spring intro member so it returns the right number of directorships (#532)
* Check if user is spring intro member * removed whitespace --------- Co-authored-by: Noah Hanford <spaced@csh.rit.edu>
1 parent ebbfdc6 commit e286947

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

conditional/util/member.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ def get_hm(member, only_absent=False):
146146
# @service_cache(maxsize=128) # Can't hash because members_on_coop is a list
147147
def req_cm(uid, members_on_coop=None):
148148
# Get the number of required committee meetings based on if the member
149-
# is going on co-op in the current operating session.
149+
# is going on co-op in the current operating session, or if the member
150+
# was a spring intro member.
150151
on_coop = False
151152

152153
if members_on_coop:
@@ -157,7 +158,16 @@ def req_cm(uid, members_on_coop=None):
157158
CurrentCoops.date_created > start_of_year()).first()
158159
if co_op:
159160
on_coop = True
160-
if on_coop:
161+
162+
spring_semester_start = datetime(start_of_year().year + 1, 1, 1)
163+
164+
is_spring_intro = FreshmanEvalData.query.filter(
165+
FreshmanEvalData.uid == uid,
166+
FreshmanEvalData.freshman_eval_result == "Passed",
167+
FreshmanEvalData.eval_date >= spring_semester_start
168+
).first() is not None
169+
170+
if on_coop or is_spring_intro:
161171
return 15
162172
return 30
163173

0 commit comments

Comments
 (0)