From be4c98f608af795f17d24f09103a4774896da5cb Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Fri, 27 Sep 2024 17:19:08 +0200 Subject: [PATCH] import contacts: only drop relation of type representative if holder and anchor are the same --- .../hsadminng/hs/migration/BaseOfficeDataImport.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java b/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java index f00d57dd..c60645ba 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/migration/BaseOfficeDataImport.java @@ -503,7 +503,7 @@ public abstract class BaseOfficeDataImport extends CsvDataImport { // this happens if a natural person is marked as 'contractual' for itself final var idsToRemove = new HashSet(); relations.forEach((id, r) -> { - if (r.getHolder() == r.getAnchor()) { + if (r.getType() == HsOfficeRelationType.REPRESENTATIVE && r.getHolder() == r.getAnchor()) { idsToRemove.add(id); } });