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);