bug fixed

This commit is contained in:
Ahmed Salah Tawfik Ibrahim 2024-04-11 14:44:58 +02:00
parent b8f9b0a90a
commit 18cb5b7312
1 changed files with 9 additions and 3 deletions

View File

@ -2191,18 +2191,24 @@ public final class DBCassandraAstyanaxImpl implements DatabookStore {
_log.info("Asking for Single Notification preference of " + userid + " Type: " + notificationType);
List<NotificationChannelType> toReturn = new ArrayList<NotificationChannelType>();
NotificationChannelType[] toProcess = getUserNotificationPreferences(userid).get(notificationType);
_log.info("size of user notification preferences" + toProcess.length);
//_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)
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;
}
}
/**
* called when you add new notification types where the setting does not exist yet