From 018ce5813601b49280111c46bb6de1d56de0509f Mon Sep 17 00:00:00 2001 From: sgiannopoulos Date: Tue, 12 Nov 2024 11:55:36 +0200 Subject: [PATCH] migration fix --- .../main/java/eu/old/eudat/migration/UserMigrationService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dmp-migration-tool/web/src/main/java/eu/old/eudat/migration/UserMigrationService.java b/dmp-migration-tool/web/src/main/java/eu/old/eudat/migration/UserMigrationService.java index 11b1fa564..e50ec52a3 100644 --- a/dmp-migration-tool/web/src/main/java/eu/old/eudat/migration/UserMigrationService.java +++ b/dmp-migration-tool/web/src/main/java/eu/old/eudat/migration/UserMigrationService.java @@ -130,7 +130,7 @@ public class UserMigrationService { data.setAvatarUrl(avatarUrl); item.setAdditionalInfo(this.jsonHandlingService.toJson(data)); if (item.getName() == null || item.getName().isBlank()) { - if (oldUser != null && oldUser.getEmail() != null && !item.getName().isBlank()) item.setName(oldUser.getEmail()); + if (oldUser != null && oldUser.getEmail() != null && !oldUser.getEmail().isBlank()) item.setName(oldUser.getEmail()); else item.setName("No name"); } this.entityManager.persist(item);