Commit 0f43298e authored by Roberto Loayza's avatar Roberto Loayza

CalendarService

parent ec92718b
...@@ -174,11 +174,14 @@ public class CalendarService extends XDFService<Calendar, CalendarBean, String> ...@@ -174,11 +174,14 @@ public class CalendarService extends XDFService<Calendar, CalendarBean, String>
if (calendarExceptionBean.getId() != null) { if (calendarExceptionBean.getId() != null) {
Optional<CalendarException> calendarExceptionOptional = calendarExceptionRepository.findById(calendarExceptionBean.getId()); Optional<CalendarException> calendarExceptionOptional = calendarExceptionRepository.findById(calendarExceptionBean.getId());
if (calendarExceptionOptional.isPresent()) {
exceptionIds.add(calendarExceptionBean.getId());
}
if (calendarExceptionBean.isDelete()) { if (calendarExceptionBean.isDelete()) {
calendarExceptionRepository.delete(calendarExceptionOptional.get()); calendarExceptionRepository.delete(calendarExceptionOptional.get());
continue; continue;
} }
exceptionIds.add(calendarExceptionBean.getId());
// modificar // modificar
if (!calendarExceptionOptional.get().getFrequencyType().equals(calendarExceptionBean.getFrequencyType())) { if (!calendarExceptionOptional.get().getFrequencyType().equals(calendarExceptionBean.getFrequencyType())) {
calendarExceptionRepository.delete(calendarExceptionOptional.get()); calendarExceptionRepository.delete(calendarExceptionOptional.get());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment