diff --git a/backend/backend_api/views.py b/backend/backend_api/views.py index fe26106..0c2669a 100644 --- a/backend/backend_api/views.py +++ b/backend/backend_api/views.py @@ -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)