Skip to content

Commit

Permalink
Merge pull request #994 from AI4Bharat/sn_897_review_spercheck_projec…
Browse files Browse the repository at this point in the history
…t_count

added project count to the response of review and supercheck workspace user report
  • Loading branch information
aparna-aa authored Nov 8, 2024
2 parents 437b2a0 + c6a09fa commit 9bcf319
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions backend/workspaces/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1005,6 +1005,7 @@ def user_analytics(self, request, pk=None):
project_progress_stage,
project_type,
)
result["No.of Projects"] = reviewer_projs.count()
final_reports.append(result)
elif user_id in workspace_reviewer_list:
reviewer_projs = Project.objects.filter(
Expand All @@ -1022,6 +1023,7 @@ def user_analytics(self, request, pk=None):
project_progress_stage,
project_type,
)
result["No.of Projects"] = reviewer_projs.count()
final_reports.append(result)

else:
Expand Down Expand Up @@ -1067,6 +1069,7 @@ def user_analytics(self, request, pk=None):
result = get_supercheck_reports(
superchecker_projs_ids, id, start_date, end_date, project_type
)
result["No.of Projects"] = superchecker_projs.count()
final_reports.append(result)
elif user_id in workspace_superchecker_list:
superchecker_projs = Project.objects.filter(
Expand All @@ -1081,6 +1084,7 @@ def user_analytics(self, request, pk=None):
result = get_supercheck_reports(
superchecker_projs_ids, user_id, start_date, end_date, project_type
)
result["No.of Projects"] = superchecker_projs.count()
final_reports.append(result)

else:
Expand Down

0 comments on commit 9bcf319

Please sign in to comment.