Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add null checks to summaries #7160

Merged
merged 4 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ public RecordSummaryPojo getRecordSummaryPojo(String orcid) {
for (EmailDomain ed : recordSummary.getEmailDomains().getEmailDomains()) {
EmailDomainSummary eds = new EmailDomainSummary();
eds.setValue(ed.getValue());
if (ed.getVerificationDate() != null) {
if (ed.getVerificationDate() != null && ed.getVerificationDate().getValue() != null) {
eds.setVerificationDate(ed.getVerificationDate().toString());
}
emailDomains.add(eds);
Expand Down Expand Up @@ -524,7 +524,7 @@ public void generateEmailDomainsSummary(RecordSummary recordSummary, String orci
for (ProfileEmailDomainEntity ped : emailDomains) {
ed = new EmailDomain();
ed.setValue(ped.getEmailDomain());
if (!ped.getGeneratedByScript()) {
if (!ped.getGeneratedByScript() && ped.getDateCreated() != null) {
VerificationDate verificationDate = new VerificationDate(DateUtils.convertToXMLGregorianCalendar(ped.getDateCreated()));
ed.setVerificationDate(verificationDate);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ public void testFindNotificationsToSendLegacy() {
for (Long id : ids) {
notificationDao.remove(id);
}

}

private Long createNotification(String orcid, Date sentDate) {
Expand Down
Loading