Skip to content

Commit

Permalink
Merge pull request #35 from SAIG-KMITL/dev
Browse files Browse the repository at this point in the history
Deployment - fix roadmap
  • Loading branch information
pawito236 authored Nov 28, 2024
2 parents dad9e74 + f8ebb5c commit b524664
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/roadmap_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,12 +316,15 @@ def validated_roadmap_course(courses: List[Any], validated_roadmap: List[Dict[st
seen_ids = set()
unique_courses = []
total_duration = 0
current_priority = 1

for course in validated_roadmap:
if course["id"] in valid_course_ids and course["id"] not in seen_ids:
course['priority'] = current_priority
unique_courses.append(course)
seen_ids.add(course["id"])
total_duration += course["duration"]
current_priority+=1

return unique_courses, total_duration

Expand Down

0 comments on commit b524664

Please sign in to comment.