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
|
* @param allowSessions Integer representing what kind of sessions are allowed
|
||||||
*/
|
*/
|
||||||
public void setAllowSessions(final int allowSessions) {
|
public void setAllowSessions(AllowSessionsEnum allowSessions) {
|
||||||
this.allowSessions = allowSessions;
|
this.allowSessions = allowSessions.getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -45,7 +45,7 @@ public class SystemWideAlertServiceImpl implements SystemWideAlertService {
|
|||||||
final Date countdownTo, final boolean active) throws SQLException {
|
final Date countdownTo, final boolean active) throws SQLException {
|
||||||
SystemWideAlert systemWideAlert = new SystemWideAlert();
|
SystemWideAlert systemWideAlert = new SystemWideAlert();
|
||||||
systemWideAlert.setMessage(message);
|
systemWideAlert.setMessage(message);
|
||||||
systemWideAlert.setAllowSessions(allowSessionsType.getValue());
|
systemWideAlert.setAllowSessions(allowSessionsType);
|
||||||
systemWideAlert.setCountdownTo(countdownTo);
|
systemWideAlert.setCountdownTo(countdownTo);
|
||||||
systemWideAlert.setActive(active);
|
systemWideAlert.setActive(active);
|
||||||
|
|
||||||
|
@@ -105,7 +105,7 @@ public class SystemWideAlertRestRepository extends DSpaceRestRepository<SystemWi
|
|||||||
}
|
}
|
||||||
|
|
||||||
systemWideAlert.setMessage(systemWideAlertRest.getMessage());
|
systemWideAlert.setMessage(systemWideAlertRest.getMessage());
|
||||||
systemWideAlert.setAllowSessions(systemWideAlertRest.getAllowSessions());
|
systemWideAlert.setAllowSessions(AllowSessionsEnum.fromInt(systemWideAlertRest.getAllowSessions()));
|
||||||
systemWideAlert.setCountdownTo(systemWideAlertRest.getCountdownTo());
|
systemWideAlert.setCountdownTo(systemWideAlertRest.getCountdownTo());
|
||||||
systemWideAlert.setActive(systemWideAlertRest.isActive());
|
systemWideAlert.setActive(systemWideAlertRest.isActive());
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user