diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8e90b45..080355e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,7 +4,7 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
-## [v2.0.0] - 2023-12-04
+## [v2.0.0-SNAPSHOT] - 2023-12-04
- Support for Cassandra 4.1.3 using DataStax java driver
diff --git a/pom.xml b/pom.xml
index e671a3b..48cad3a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -11,7 +11,7 @@
org.gcube.portal
social-networking-library
- 2.0.0
+ 2.0.0-SNAPSHOT
gCube Social Networking Library
The gCube Social Networking Library is the 'bridge' between your gCube Applications and the social networking facilities.
diff --git a/src/main/java/org/gcube/portal/databook/server/DBCassandraAstyanaxImpl.java b/src/main/java/org/gcube/portal/databook/server/DBCassandraAstyanaxImpl.java
index 6defd6e..cdfb4fc 100644
--- a/src/main/java/org/gcube/portal/databook/server/DBCassandraAstyanaxImpl.java
+++ b/src/main/java/org/gcube/portal/databook/server/DBCassandraAstyanaxImpl.java
@@ -2192,24 +2192,27 @@ public final class DBCassandraAstyanaxImpl implements DatabookStore {
List toReturn = new ArrayList();
Map userNotPref = getUserNotificationPreferences(userid);
if(userNotPref!=null){
- NotificationChannelType[] toProcess = userNotPref.get(notificationType);
- //_log.info("size of user notification preferences" + toProcess.length);
- if (toProcess == null) {
- _log.info("Single Notification preference of " + userid + " Type: " + notificationType + " not existing ... creating default");
- return createNewNotificationType(userid, notificationType);
- }
- else if (toProcess.length == 0){
- _log.info("size of user notification preferences " + 0);
- return toReturn;
- }
- else
- {
- _log.info("size of user notification preferences " + toProcess.length);
- for (int i = 0; i < toProcess.length; i++) {
- toReturn.add(toProcess[i]);
+ if(userNotPref.containsKey(notificationType)){
+ NotificationChannelType[] toProcess = userNotPref.get(notificationType);
+ //_log.info("size of user notification preferences" + toProcess.length);
+ if (toProcess == null) {
+ _log.info("Single Notification preference of " + userid + " Type: " + notificationType + " not existing ... creating default");
+ return createNewNotificationType(userid, notificationType);
+ }
+ else if (toProcess.length == 0){
+ _log.info("size of user notification preferences " + 0);
+ return toReturn;
+ }
+ else
+ {
+ _log.info("size of user notification preferences " + toProcess.length);
+ for (int i = 0; i < toProcess.length; i++) {
+ toReturn.add(toProcess[i]);
+ }
+ return toReturn;
}
- return toReturn;
}
+ return toReturn;
}
return toReturn;