Commit 5f847f30 authored by lvshibao's avatar lvshibao

scores页面修改

parent 433870b2
...@@ -51,7 +51,7 @@ class TasksApi(viewsets.ViewSet): ...@@ -51,7 +51,7 @@ class TasksApi(viewsets.ViewSet):
team_names = get_team_names(city_id, country_id) team_names = get_team_names(city_id, country_id)
session_condition['task__in'] = team_names session_condition['task__in'] = team_names
seat_ids = SeatStat.objects.filter(**session_condition).values_list('agentName', flat=True) seat_ids = list(set(SeatStat.objects.filter(**session_condition).values_list('agentName', flat=True)))
seat_id_names = Seat.objects.filter(code__in=seat_ids).values('code', 'name') seat_id_names = Seat.objects.filter(code__in=seat_ids).values('code', 'name')
seat_ids_with_name = [x['code'] for x in seat_id_names] seat_ids_with_name = [x['code'] for x in seat_id_names]
extra = [{'code': seat_id, 'name': seat_id} for seat_id in seat_ids if seat_id not in seat_ids_with_name] extra = [{'code': seat_id, 'name': seat_id} for seat_id in seat_ids if seat_id not in seat_ids_with_name]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment