Commit 99be3bbf authored by John Red Medrano's avatar John Red Medrano

Merge pull request #651 in RMS/api-main-service from red-develop to product-dev

* commit 'c64c9c43':
  fixed issue on rms dashboard max_display, user and department count
parents 7ad45949 c64c9c43
...@@ -32,12 +32,12 @@ class RMSDashBoardViewSet(APIView): ...@@ -32,12 +32,12 @@ class RMSDashBoardViewSet(APIView):
recently_company = {} recently_company = {}
recently_users = User.objects.all().values( recently_users = User.objects.exclude(id=1).values(
'name', 'name',
'department__company__name', 'department__company__name',
'department__name', 'department__name',
'date_joined' 'date_joined'
) )[:10]
if user_type == enums_department: if user_type == enums_department:
...@@ -88,9 +88,9 @@ class RMSDashBoardViewSet(APIView): ...@@ -88,9 +88,9 @@ class RMSDashBoardViewSet(APIView):
) )
else: else:
company_count = Company.objects.all().count() company_count = Company.objects.exclude(id=1).count()
companies = Company.objects.all()[0:10] companies = Company.objects.all()[0:10]
department_count = Department.objects.all().count() department_count = Department.objects.exclude(id=1).count()
user_count = User.objects.all().count() user_count = User.objects.all().count()
for data in companies: for data in companies:
......
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