Skip to content

Commit

Permalink
fix proj id passing
Browse files Browse the repository at this point in the history
  • Loading branch information
tomolopolis committed Sep 10, 2020
1 parent 8bf8261 commit d1039b0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions webapp/api/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,11 +600,11 @@ def download_annos(request):
if not user.is_superuser:
return HttpResponseBadRequest('User is not super user, and not allowed to download project outputs')

p_ids = request.GET['project_id']
p_ids = str(request.GET['project_ids']).split(',')
with_text_flag = request.GET.get('with_text', False)

if p_ids is None:
return HttpResponseBadRequest('No projects to download annotations')
if p_ids is None or len(p_ids) == 0:
return HttpResponseBadRequest('No projects to download annotations')

projects = ProjectAnnotateEntities.objects.filter(id__in=p_ids)
out = download_projects_with_text(projects) if with_text_flag else \
Expand Down

0 comments on commit d1039b0

Please sign in to comment.