Skip to content

Commit

Permalink
Merge pull request #1898 from Scifabric/issue-1890
Browse files Browse the repository at this point in the history
Fixes #1890
  • Loading branch information
teleyinex authored Nov 13, 2018
2 parents bb9b502 + 10b2952 commit bfdfcb5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions pybossa/api/global_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def get(self, oid=None):
n_projects = cached_projects.n_published() + cached_projects.n_count('draft')
data = dict(n_projects=n_projects,
n_users=n_users,
n_tasks=stats.n_total_tasks_site(),
n_task_runs=stats.n_task_runs_site(),
n_pending_tasks=n_pending_tasks,
n_results=stats.n_results_site(),
Expand Down
1 change: 1 addition & 0 deletions test/test_api/test_global_stats_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def test_global_stats(self):
stats = json.loads(res.data)
assert res.status_code == 200, res.status_code
keys = ['n_projects', 'n_pending_tasks',
'n_tasks',
'n_users', 'n_task_runs', 'n_results', 'categories']
for k in keys:
err_msg = "%s should be in stats JSON object" % k
Expand Down

0 comments on commit bfdfcb5

Please sign in to comment.