Handle failure to retrieve the alarm by Id by returning null instead of a NullPointerException
This commit is contained in:
parent
7c6394b1f8
commit
6776df2319
@ -83,6 +83,8 @@ public class AlarmDAOImpl implements AlarmDAO {
|
||||
.bind("id", id)
|
||||
.map(new BeanMapper<Alarm>(Alarm.class))
|
||||
.first();
|
||||
if (alarm == null)
|
||||
return alarm;
|
||||
|
||||
alarm.setSubAlarms(subAlarmsForRows(
|
||||
h,
|
||||
|
Loading…
x
Reference in New Issue
Block a user