Skip to content

Commit

Permalink
fix: [ANDROAPP-6116] respect relationship constraints (#3680)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmmateos authored Jun 14, 2024
1 parent afe0b88 commit 36c2ad5
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import org.hisp.dhis.android.core.common.State
import org.hisp.dhis.android.core.event.Event
import org.hisp.dhis.android.core.organisationunit.OrganisationUnit
import org.hisp.dhis.android.core.program.ProgramType
import org.hisp.dhis.android.core.relationship.RelationshipEntityType
import org.hisp.dhis.android.core.relationship.RelationshipItem
import org.hisp.dhis.android.core.relationship.RelationshipItemEvent
import org.hisp.dhis.android.core.relationship.RelationshipItemTrackedEntityInstance
Expand Down Expand Up @@ -55,7 +54,7 @@ class RelationshipRepositoryImpl(

return d2.relationshipModule().relationshipTypes()
.withConstraints()
.byConstraint(RelationshipEntityType.TRACKED_ENTITY_INSTANCE, teTypeUid)
.byAvailableForTrackedEntityInstance(config.teiUid)
.get().map { relationshipTypes ->
relationshipTypes.mapNotNull { relationshipType ->
val secondaryTeTypeUid = when {
Expand Down

0 comments on commit 36c2ad5

Please sign in to comment.