migration fix

This commit is contained in:
Efstratios Giannopoulos 2024-11-12 11:55:36 +02:00
parent 647086f1dd
commit 018ce58136
1 changed files with 1 additions and 1 deletions

View File

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