mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-12 04:23:13 +00:00
97425: Fix issue with sessions null value
This commit is contained in:
@@ -106,8 +106,8 @@ public class SystemWideAlert implements ReloadableEntity<Integer> {
|
||||
*
|
||||
* @param allowSessions Integer representing what kind of sessions are allowed
|
||||
*/
|
||||
public void setAllowSessions(final int allowSessions) {
|
||||
this.allowSessions = allowSessions;
|
||||
public void setAllowSessions(AllowSessionsEnum allowSessions) {
|
||||
this.allowSessions = allowSessions.getValue();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -45,7 +45,7 @@ public class SystemWideAlertServiceImpl implements SystemWideAlertService {
|
||||
final Date countdownTo, final boolean active) throws SQLException {
|
||||
SystemWideAlert systemWideAlert = new SystemWideAlert();
|
||||
systemWideAlert.setMessage(message);
|
||||
systemWideAlert.setAllowSessions(allowSessionsType.getValue());
|
||||
systemWideAlert.setAllowSessions(allowSessionsType);
|
||||
systemWideAlert.setCountdownTo(countdownTo);
|
||||
systemWideAlert.setActive(active);
|
||||
|
||||
|
@@ -105,7 +105,7 @@ public class SystemWideAlertRestRepository extends DSpaceRestRepository<SystemWi
|
||||
}
|
||||
|
||||
systemWideAlert.setMessage(systemWideAlertRest.getMessage());
|
||||
systemWideAlert.setAllowSessions(systemWideAlertRest.getAllowSessions());
|
||||
systemWideAlert.setAllowSessions(AllowSessionsEnum.fromInt(systemWideAlertRest.getAllowSessions()));
|
||||
systemWideAlert.setCountdownTo(systemWideAlertRest.getCountdownTo());
|
||||
systemWideAlert.setActive(systemWideAlertRest.isActive());
|
||||
|
||||
|
Reference in New Issue
Block a user