From 0847a21c7c17ed79b49f0d88720b1e93f34bdfb4 Mon Sep 17 00:00:00 2001 From: Pablo Date: Fri, 2 Feb 2024 07:52:10 +0100 Subject: [PATCH] fix test Signed-off-by: Pablo --- .../org/dhis2/form/data/metadata/EnrollmentConfiguration.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/form/src/main/java/org/dhis2/form/data/metadata/EnrollmentConfiguration.kt b/form/src/main/java/org/dhis2/form/data/metadata/EnrollmentConfiguration.kt index cb4fe4c745..1e89339500 100644 --- a/form/src/main/java/org/dhis2/form/data/metadata/EnrollmentConfiguration.kt +++ b/form/src/main/java/org/dhis2/form/data/metadata/EnrollmentConfiguration.kt @@ -6,6 +6,7 @@ import org.dhis2.commons.bindings.enrollmentImportConflicts import org.dhis2.commons.bindings.program import org.dhis2.commons.bindings.tei import org.dhis2.commons.bindings.teiAttribute +import org.dhis2.commons.bindings.trackedEntityType import org.dhis2.form.model.OptionSetConfiguration import org.hisp.dhis.android.core.D2 import org.hisp.dhis.android.core.arch.repositories.scope.RepositoryScope @@ -25,7 +26,7 @@ class EnrollmentConfiguration(private val d2: D2, private val enrollmentUid: Str } fun tei() = enrollment()?.trackedEntityInstance()?.let { d2.tei(it) } - fun trackedEntityType() = program()?.trackedEntityType() + fun trackedEntityType() = d2.trackedEntityType(program()?.trackedEntityType()?.uid()!!) fun sections() = d2.programModule().programSections() .withAttributes() .byProgramUid().eq(enrollment()?.program())