From 3b84719968e3531bbf6fe0339a6e80e5374520cc Mon Sep 17 00:00:00 2001 From: DonHaul Date: Wed, 14 Aug 2024 09:53:11 +0200 Subject: [PATCH] tests --- backoffice/config/api_router.py | 2 +- workflows/dags/author/author_create/shared_tasks.py | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/backoffice/config/api_router.py b/backoffice/config/api_router.py index c5bbafa0..fce8e177 100644 --- a/backoffice/config/api_router.py +++ b/backoffice/config/api_router.py @@ -21,6 +21,6 @@ ) router.register("workflows", WorkflowViewSet, basename="workflows") (router.register("workflow-ticket", WorkflowTicketViewSet, basename="workflow-ticket"),) -router.register("decision", DecisionViewSet, basename="decisions") +router.register("decisions", DecisionViewSet, basename="decisions") app_name = "api" urlpatterns = router.urls diff --git a/workflows/dags/author/author_create/shared_tasks.py b/workflows/dags/author/author_create/shared_tasks.py index fb227764..1c02e314 100644 --- a/workflows/dags/author/author_create/shared_tasks.py +++ b/workflows/dags/author/author_create/shared_tasks.py @@ -1,5 +1,6 @@ from airflow.decorators import task from hooks.backoffice.base import BackofficeHook +from hooks.backoffice.workflow_management_hook import WorkflowManagementHook @task() @@ -13,4 +14,10 @@ def create_decision_on_curation_choice(**context): "workflow_id": context["params"]["workflow_id"], } + workflow_data = WorkflowManagementHook().get_workflow( + workflow_id=context["params"]["workflow_id"] + ) + + print(workflow_data) + BackofficeHook().request(method="POST", data=data, endpoint="api/decisions/")