Revision 60526
Added by Argiro Kokogiannaki about 3 years ago
modules/uoa-claims-api/trunk/src/main/java/eu/dnetlib/openaire/rest/ClaimsService.java | ||
---|---|---|
874 | 874 |
logger.debug("About to fetch notification"); |
875 | 875 |
notification = fetchNotificationHandler.fetchNotification(openaireId, userMail); |
876 | 876 |
|
877 |
if (notifications == null) {
|
|
877 |
if (notification != null) {
|
|
878 | 878 |
notifications = new ArrayList<Notification>(); |
879 |
} |
|
880 |
if (notification == null) { |
|
881 |
notification = new Notification(openaireId, communityInfo.getName(), userMail, Integer.parseInt(defaultFrequencyInHours), true); |
|
882 |
} else { |
|
883 | 879 |
notification.setOpenaireName(communityInfo.getName()); |
880 |
notifications.add(notification); |
|
884 | 881 |
} |
885 |
notifications.add(notification); |
|
886 | 882 |
} |
887 | 883 |
} else { |
888 | 884 |
Map<String, String> projectIdsAndNames = fetchProjectHandler.fetchProjectIdsAndNamesByProjectManagerMail(userMail); |
Also available in: Unified diff
Do not initialize notifications if nothing found in the db - Return 204