Skip to content

Commit

Permalink
feat: use room in bridge
Browse files Browse the repository at this point in the history
Co-Authored-By: @sindremil
  • Loading branch information
jorgengaldal committed Sep 14, 2024
1 parent 1dabf6b commit b508633
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions algorithm/bridge/fetch_applicants_and_committees.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def main():


#or period["name"] == "Juli Opptak"
if (application_end < now and period["hasSentInterviewTimes"] == False):
if period["name"] == "FAKE TEST OPPTAK!":
applicants = fetch_applicants(periodId)
committee_times = fetch_committee_times(periodId)

Expand Down Expand Up @@ -115,11 +115,13 @@ def format_match_results(match_results: MeetingMatch, applicants: List[dict], pe
time_interval = result[2]
start = time_interval.start.isoformat()
end = time_interval.end.isoformat()
room = result[3]

transformed_results[applicant_id]["interviews"].append({
"start": start,
"end": end,
"committeeName": committee.name
"committeeName": committee.name,
"room": room
})

return list(transformed_results.values())
Expand Down Expand Up @@ -156,8 +158,8 @@ def create_committee_objects(committee_data: List[dict]) -> set[Committee]:
start=datetime.fromisoformat(interval_data['start'].replace("Z", "+00:00")),
end=datetime.fromisoformat(interval_data['end'].replace("Z", "+00:00"))
)
capacity = interval_data.get('capacity', 1)
committee.add_interval(interval, capacity)
room = interval_data["room"]
committee.add_interview_slot(interval, room)
committees.add(committee)
return committees

Expand Down

0 comments on commit b508633

Please sign in to comment.