File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
src/kili/adapters/kili_api_gateway/project_workflow
tests/integration/presentation Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 22
33from typing import Dict , Union
44
5+ from cuid import cuid
6+
57from kili .domain .project import WorkflowStepCreate , WorkflowStepUpdate
68
79from .types import ProjectWorkflowDataKiliAPIGatewayInput
@@ -26,7 +28,7 @@ def project_input_mapper(data: ProjectWorkflowDataKiliAPIGatewayInput) -> Dict:
2628def update_step_mapper (data : Union [WorkflowStepCreate , WorkflowStepUpdate ]) -> Dict :
2729 """Build the GraphQL create StepData variable to be sent in an operation."""
2830 step = {
29- "id" : data ["id" ] if "id" in data else None ,
31+ "id" : data ["id" ] if "id" in data else cuid () ,
3032 "name" : data ["name" ] if "name" in data else None ,
3133 "consensusCoverage" : data ["consensus_coverage" ] if "consensus_coverage" in data else None ,
3234 "numberOfExpectedLabelsForConsensus" : data ["number_of_expected_labels_for_consensus" ]
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ def test_when_updating_project_workflow_then_it_returns_updated_project_workflow
2323
2424 # Then
2525 kili .kili_api_gateway .graphql_client .execute .assert_called_once_with (
26- get_update_project_workflow_mutation (" enforceStepSeparation" ),
26+ get_update_project_workflow_mutation (" enforceStepSeparation steps{id} " ),
2727 {
2828 "input" : {
2929 "projectId" : "fake_proj_id" ,
You can’t perform that action at this time.
0 commit comments