Browse Source

Rename parameter name

pull/1799/head
Hironsan 2 years ago
parent
commit
cfcdcf247b
2 changed files with 4 additions and 4 deletions
  1. 6
      backend/data_export/celery_tasks.py
  2. 2
      backend/data_export/views.py

6
backend/data_export/celery_tasks.py

@ -56,9 +56,9 @@ def create_individual_dataset(project: Project, file_format: str, confirmed_only
@shared_task
def export_dataset(project_id, file_format: str, export_approved=False):
def export_dataset(project_id, file_format: str, confirmed_only=False):
project = get_object_or_404(Project, pk=project_id)
if project.collaborative_annotation:
return create_collaborative_dataset(project, file_format, export_approved)
return create_collaborative_dataset(project, file_format, confirmed_only)
else:
return create_individual_dataset(project, file_format, export_approved)
return create_individual_dataset(project, file_format, confirmed_only)

2
backend/data_export/views.py

@ -39,6 +39,6 @@ class DatasetExportAPI(APIView):
file_format = request.data.pop("format")
export_approved = request.data.pop("exportApproved", False)
task = export_dataset.delay(
project_id=project_id, file_format=file_format, export_approved=export_approved, **request.data
project_id=project_id, file_format=file_format, confirmed_only=export_approved, **request.data
)
return Response({"task_id": task.task_id})
Loading…
Cancel
Save