.select(Lesson.class)
.where(LessonType.DATE.gte(weekStart))
.and(LessonType.DATE.lt(weekStart.plusWeeks(1)))
.get()
.toList();
<BUG>if(cached.isEmpty()) {
</BUG>
return updateTimetable(weekStart);
<BUG>}else {

return new DeferredObject<List<Lesson>, Void, Void>().resolve(cached).promise();
</BUG>
}

.select(Lesson.class)
.where(LessonType.DATE.gte(weekStart))
.and(LessonType.DATE.lt(weekStart.plusWeeks(1)))
.get()
.toList();
if (cached.isEmpty()) {
return updateTimetable(weekStart);
} else {
return new DeferredObject<List<Lesson>, Throwable, Void>().resolve(cached).promise();
