Skip to content

Commit 689594a

Browse files
authored
Merge branch 'develop' into shaeespring/ai_usage
2 parents 4fa2c8d + 4c45c9a commit 689594a

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

‎conditional/util/housing.py‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,17 @@ def get_housing_queue(is_eval_director=False):
2424
}
2525

2626
queue = ldap.get_group_member_attributes(groups=['current_student'],
27-
excluded_groups=[], attributes=['uid', 'housingPoints', 'cn'])
27+
excluded_groups=[],
28+
attributes=['uid', 'housingPoints', 'cn', 'roomNumber'])
2829

29-
# if the user is not evals, they should only see people in the cue without a room number
30+
# if the user is not evals, they should only see people in the queue without a room number
3031
if not is_eval_director:
31-
queue = list(filter(lambda member: member['uid'] in in_queue and member['roomNumber'] is not None, queue))
32-
32+
def member_in_queue(member):
33+
return (
34+
member['uid'] in in_queue
35+
and ('roomNumber' not in member or member['roomNumber'] is not None)
36+
)
37+
queue = list(filter(member_in_queue, queue))
3338

3439
# set the time they were added to the queue
3540
# i'm sorry this is cursed, it's this way because of database structure or something

0 commit comments

Comments
 (0)