Skip to content

Commit

Permalink
refactor: [AXM-53] add some optimization for assignments collecting
Browse files Browse the repository at this point in the history
  • Loading branch information
NiedielnitsevIvan committed Apr 2, 2024
1 parent 7eb1ad7 commit 9655f59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lms/djangoapps/mobile_api/users/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,8 @@ def get_course_assignments(self, model: CourseEnrollment) -> Optional[Dict[str,
if assignment.date < datetime.now(timezone):
past_assignment.append(assignment)
else:
if not next_assignment:
next_assignment = DateSummarySerializer(assignment).data
next_assignment = DateSummarySerializer(assignment).data
break

return {
'future_assignment': next_assignment,
Expand Down

0 comments on commit 9655f59

Please sign in to comment.