From 47285c156bcd7b90664b7d7a94e9dc5910337f5d Mon Sep 17 00:00:00 2001 From: Hristo Oskov Date: Wed, 16 Feb 2022 16:37:20 -0800 Subject: [PATCH] actually get the id --- .../openlattice/mechanic/upgrades/V3StudyMigrationUpgrade.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/com/openlattice/mechanic/upgrades/V3StudyMigrationUpgrade.kt b/src/main/kotlin/com/openlattice/mechanic/upgrades/V3StudyMigrationUpgrade.kt index e1592cc5..2b22c43d 100644 --- a/src/main/kotlin/com/openlattice/mechanic/upgrades/V3StudyMigrationUpgrade.kt +++ b/src/main/kotlin/com/openlattice/mechanic/upgrades/V3StudyMigrationUpgrade.kt @@ -180,11 +180,12 @@ class V3StudyMigrationUpgrade( Optional.empty(), false ).forEach { (legacyStudyEkid, legacyStudyFqnToValue) -> - logger.info("Processing all legacy participants of $legacyStudyEkid, with stringid ${legacyStudyFqnToValue.getOrDefault(FullQualifiedName("general.stringid"), null)}") + val studyId = legacyStudyFqnToValue[FullQualifiedName("general.stringid")]?.firstOrNull() as String? + logger.info("Processing all legacy participants of $legacyStudyEkid with id $studyId") if (legacyStudyFqnToValue.isNotEmpty()) { try { entitySets.keySet( - Predicates.equal("name", "chronicle_participants_${legacyStudyFqnToValue.getOrDefault(FullQualifiedName("general.stringid"), null)}") + Predicates.equal("name", "chronicle_participants_$studyId") ).forEach { participantESID -> dataQueryService.getEntitiesWithPropertyTypeFqns( mapOf(participantESID to Optional.of(setOf())),