(session,
job_id,
project_string_id,
task_id,
input)
| 37 | |
| 38 | @Permission_Task.by_task_id(apis_user_list=["builder_or_trainer"]) |
| 39 | def task_next_core(session, |
| 40 | job_id, |
| 41 | project_string_id, |
| 42 | task_id, |
| 43 | input): |
| 44 | |
| 45 | assign_to_user = input['assign_to_user'] |
| 46 | |
| 47 | if assign_to_user is True: |
| 48 | task = Task.get_task_from_job_id( |
| 49 | session=session, |
| 50 | job_id=job_id, |
| 51 | user = User.get(session), |
| 52 | direction=input['direction'], |
| 53 | assign_to_user=assign_to_user) |
| 54 | |
| 55 | else: |
| 56 | task = Task.navigate_tasks_relative_to_given_task( |
| 57 | session=session, |
| 58 | task_id=task_id, |
| 59 | direction=input['direction'] |
| 60 | ) |
| 61 | |
| 62 | if not task: |
| 63 | return False |
| 64 | |
| 65 | task_serialized = task.serialize_builder_view_by_id(session) |
| 66 | |
| 67 | return task_serialized |
no test coverage detected