Skip to content

Commit

Permalink
fix: try getting professor before creating group
Browse files Browse the repository at this point in the history
  • Loading branch information
mariajgrimaldi committed Aug 28, 2023
1 parent 207462f commit 93780a9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lms/djangoapps/teams/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,12 @@ def post(self, request):
)

data = CourseTeamSerializer(team, context={"request": request}).data
professor = User.objects.get(username='professor')
professor = request.data.get("professor")
if professor:
try:
professor = User.objects.get(username=professor)
except User.DoesNotExist:
pass
group = add_group_to_course(
team.name,
course_key,
Expand Down

0 comments on commit 93780a9

Please sign in to comment.