
if (type == Calendar.Type.PERSONAL) {
</BUG>
dataStorage.removeUserEvent(cal.getCalendarOwner(), cal.getId(), id);
<BUG>} else if (type == Calendar.Type.GROUP) {
</BUG>
dataStorage.removePublicEvent(cal.getId(), id);
} else {
return null;
}

Event event = this.getById(id);
if (event == null) {
return null;
}
Calendar cal = context.getCalendarDAO().getById(event.getCalendarId());
int type = cal.getCalType();
if (type == Calendar.Type.PERSONAL.type()) {
dataStorage.removeUserEvent(cal.getCalendarOwner(), cal.getId(), id);
} else if (type == Calendar.Type.GROUP.type()) {
dataStorage.removePublicEvent(cal.getId(), id);
} else {
return null;
}
