import contacts: only drop relation of type representative if holder and anchor are the same

This commit is contained in:
Timotheus Pokorra 2024-09-27 17:19:08 +02:00 committed by Dev und Test fuer hsadminng
parent 341f5a7fb0
commit be4c98f608

View File

@ -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<Integer>();
relations.forEach((id, r) -> {
if (r.getHolder() == r.getAnchor()) {
if (r.getType() == HsOfficeRelationType.REPRESENTATIVE && r.getHolder() == r.getAnchor()) {
idsToRemove.add(id);
}
});