Skip to content

Commit

Permalink
feat: sort for TEAM LEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
azare242 authored and Adibov committed Nov 27, 2023
1 parent 554dfb4 commit 1d7da5c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/backend_api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,9 @@ def list(self, request, *args, **kwargs):
}

section_data['people'].append(person_data)

if len(section_data['people']) != 0:
section_data['people'] = sorted(section_data['people'], key=lambda x: x['role'])[::-1]
data.append(section_data)

serializer = serializers.AllStaffSectionSerializer(data, many=True)
Expand Down

0 comments on commit 1d7da5c

Please sign in to comment.