Skip to content

Commit

Permalink
fix: tasks features api
Browse files Browse the repository at this point in the history
  • Loading branch information
nrjadkry committed Aug 8, 2023
1 parent 4585a0b commit 4318863
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/backend/app/tasks/tasks_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,15 @@ async def task_features_count(
result = db.execute(feature_count_query)
feature_count = result.fetchone()

form_details = central_crud.get_form_full_details(project.odkid, task, odk_credentials)
submission_list = central_crud.list_task_submissions(project.odkid, task, odk_credentials)

# form_details = central_crud.get_form_full_details(project.odkid, task, odk_credentials)
data.append({
'task_id': task,
'feature_count': feature_count['count'],
'submission_count': form_details['submissions'],
# 'submission_count': form_details['submissions'],
'submission_count': len(submission_list) if isinstance(submission_list, list) else 0

})

return data
return data

0 comments on commit 4318863

Please sign in to comment.