Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions conditional/util/housing.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,16 @@ def get_housing_queue(is_eval_director=False):
}

queue = ldap.get_group_member_attributes(groups=['current_student'],
excluded_groups=[], attributes=['uid', 'housingPoints', 'cn'])
excluded_groups=[], attributes=['uid', 'housingPoints', 'cn', 'roomNumber'])

# if the user is not evals, they should only see people in the cue without a room number
# if the user is not evals, they should only see people in the queue without a room number
if not is_eval_director:
queue = list(filter(lambda member: member['uid'] in in_queue and member['roomNumber'] is not None, queue))

def member_in_queue(member):
return (
member['uid'] in in_queue
and ('roomNumber' not in member or member['roomNumber'] is not None)
)
queue = list(filter(member_in_queue, queue))

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