diff --git a/engine/src/main/java/com/redhat/cloud/notifications/templates/EmailTemplateMigrationService.java b/engine/src/main/java/com/redhat/cloud/notifications/templates/EmailTemplateMigrationService.java index 6f0737925e..c1194bdec3 100644 --- a/engine/src/main/java/com/redhat/cloud/notifications/templates/EmailTemplateMigrationService.java +++ b/engine/src/main/java/com/redhat/cloud/notifications/templates/EmailTemplateMigrationService.java @@ -714,8 +714,8 @@ private void createInstantEmailTemplate(List warnings, String bundleName entityManager.persist(emailTemplate); } else { InstantEmailTemplate emailTemplate = optInstantEmailTemplate.get(); - if (bodyTemplate.getId() != emailTemplate.getBodyTemplateId() || - subjectTemplate.getId() != emailTemplate.getSubjectTemplateId()) { + if (!bodyTemplate.getId().equals(emailTemplate.getBodyTemplateId()) || + !subjectTemplate.getId().equals(emailTemplate.getSubjectTemplateId())) { emailTemplate.setSubjectTemplate(subjectTemplate); emailTemplate.setSubjectTemplateId(subjectTemplate.getId()); emailTemplate.setBodyTemplate(bodyTemplate);