Skip to content

Commit 5b256f1

Browse files
author
Nazar F
authored
fix: dhis org_units and iaso org_units overlap (#261)
1 parent 1d51228 commit 5b256f1

2 files changed

Lines changed: 27 additions & 1 deletion

File tree

openhexa/sdk/pipelines/parameter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ class IASOWidget(StrEnum):
363363
"""Enum for IASO widgets."""
364364

365365
FORMS = "IASO_FORMS"
366-
ORG_UNITS = "IASO_ORG_UNITS"
366+
IASO_ORG_UNITS = "IASO_ORG_UNITS"
367367
PROJECTS = "IASO_PROJECTS"
368368

369369

tests/test_ast.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,8 @@ def test_pipeline_with_connection_parameter_for_iaso(self):
496496
"from openhexa.sdk.pipelines.widgets import IASOWidget",
497497
"",
498498
"@parameter('iaso_con', name='IASO Connection', type=IASOConnection, required=True)",
499+
"@parameter('org_units', name='OrgUnits', type=str, widget=IASOWidget.IASO_ORG_UNITS, connection='iaso_con', required=True)",
500+
"@parameter('projects', name='Projects', type=str, widget=IASOWidget.PROJECTS, connection='iaso_con', required=True)",
499501
"@parameter('forms', name='Forms', type=str, widget=IASOWidget.FORMS, connection='iaso_con', required=True)",
500502
"@pipeline('Test pipeline')",
501503
"def test_pipeline():",
@@ -525,6 +527,30 @@ def test_pipeline_with_connection_parameter_for_iaso(self):
525527
"help": None,
526528
"required": True,
527529
},
530+
{
531+
"code": "org_units",
532+
"type": "str",
533+
"name": "OrgUnits",
534+
"widget": IASOWidget.IASO_ORG_UNITS.value,
535+
"connection": "iaso_con",
536+
"default": None,
537+
"multiple": False,
538+
"choices": None,
539+
"help": None,
540+
"required": True,
541+
},
542+
{
543+
"code": "projects",
544+
"type": "str",
545+
"name": "Projects",
546+
"widget": IASOWidget.PROJECTS.value,
547+
"connection": "iaso_con",
548+
"default": None,
549+
"multiple": False,
550+
"choices": None,
551+
"help": None,
552+
"required": True,
553+
},
528554
{
529555
"code": "forms",
530556
"type": "str",

0 commit comments

Comments
 (0)