fix role tab
This commit is contained in:
parent
5a9b45cd76
commit
b4fe5dd4b0
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user