diff --git a/backend/projects/views.py b/backend/projects/views.py index a1c604d0..4ed6e067 100644 --- a/backend/projects/views.py +++ b/backend/projects/views.py @@ -2437,7 +2437,7 @@ def assign_new_review_tasks(self, request, pk, *args, **kwargs): ).count() if reviewer_anno_count == 0: base_annotation_obj = Annotation_model( - result=[], + result=rec_ann[0].result, task=task, completed_by=cur_user, annotation_status="unreviewed", @@ -2664,7 +2664,7 @@ def assign_new_supercheck_tasks(self, request, pk, *args, **kwargs): ).count() if superchecker_anno_count == 0: base_annotation_obj = Annotation_model( - result=[], + result=rec_ann[0].result, task=task, completed_by=cur_user, annotation_status="unvalidated", diff --git a/backend/tasks/views.py b/backend/tasks/views.py index df6d52f9..a7aeeeb7 100644 --- a/backend/tasks/views.py +++ b/backend/tasks/views.py @@ -1001,16 +1001,71 @@ def delete_project_tasks(self, request, pk=None): ) @swagger_auto_schema( - method="post", - request_body=openapi.Schema( - type=openapi.TYPE_OBJECT, - properties={ - "user_id": openapi.Schema(type=openapi.TYPE_INTEGER), - "task_type": openapi.Schema(type=openapi.TYPE_STRING), - }, - required=["user_id"], - ), + method="get", manual_parameters=[ + openapi.Parameter( + "user_id", + openapi.IN_QUERY, + description=( + "A integer refering to the user id for which tasks are to be fetched" + ), + type=openapi.TYPE_INTEGER, + required=False, + ), + openapi.Parameter( + "task_type", + openapi.IN_QUERY, + description=( + "A string refering to the task type for which tasks are to be fetched" + ), + type=openapi.TYPE_STRING, + required=False, + ), + openapi.Parameter( + "search_Project ID", + openapi.IN_QUERY, + description=( + "A integer refering to the project id for which tasks are to be fetched" + ), + type=openapi.TYPE_INTEGER, + required=False, + ), + openapi.Parameter( + "search_Task ID", + openapi.IN_QUERY, + description=( + "A integer refering to the task id for which tasks are to be fetched" + ), + type=openapi.TYPE_INTEGER, + required=False, + ), + openapi.Parameter( + "search_Updated at", + openapi.IN_QUERY, + description=( + "A integer refering to the updated at time for which tasks are to be fetched" + ), + type=openapi.TYPE_INTEGER, + required=False, + ), + openapi.Parameter( + "search_Annotated at", + openapi.IN_QUERY, + description=( + "A integer refering to the annotated at time for which tasks are to be fetched" + ), + type=openapi.TYPE_INTEGER, + required=False, + ), + openapi.Parameter( + "search_Created at", + openapi.IN_QUERY, + description=( + "A integer refering to the created at time for which tasks are to be fetched" + ), + type=openapi.TYPE_INTEGER, + required=False, + ), openapi.Parameter( "page", openapi.IN_QUERY,