Skip to content

Commit

Permalink
last-opened-at
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavomm19 committed Aug 9, 2023
1 parent 18907a6 commit a18b5a2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions breathecode/assignments/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,10 @@ def get(self, request, cohort_id, academy_id):
lookup['user__cohortuser__user__id__in'] = student.split(',')
lookup['user__cohortuser__role'] = 'STUDENT'

distinct = request.GET.get('distinct', None)
if distinct is not None and distinct == 'true':
items = items.distinct()

items = items.filter(**lookup)
items = handler.queryset(items)

Expand Down

0 comments on commit a18b5a2

Please sign in to comment.