fix role tab

This commit is contained in:
Anatoly 2020-01-22 15:21:38 +03:00
parent 5a9b45cd76
commit b4fe5dd4b0

View File

@ -49,7 +49,7 @@ class RoleTabRetrieveView(generics.GenericAPIView):
# todo: Need refactoring. Extend data list with non-existed role.
for role in models.Role.role_names():
if role not in [role.get('role_name') for role in data]:
data.append({'role_name': role, 'role_number': 0})
data.append({'role_name': role, 'role_counter': 0})
return Response(data, status=status.HTTP_200_OK)