Skip to content

Commit

Permalink
restore previous behaviour of study chapter fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
ornicar committed Jun 12, 2023
1 parent 1af6f1d commit cedeed7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/study/src/main/StudyApi.scala
Expand Up @@ -64,7 +64,7 @@ final class StudyApi(
}

def byIdWithChapter(id: StudyId, chapterId: StudyChapterId): Fu[Option[Study.WithChapter]] =
studyRepo.byIdWithChapter(chapterRepo.coll)(id, chapterId)
studyRepo.byIdWithChapter(chapterRepo.coll)(id, chapterId) orElse byIdWithChapter(id)

def byIdWithFirstChapter(id: StudyId): Fu[Option[Study.WithChapter]] =
byIdWithChapterFinder(id, chapterRepo firstByStudy id)
Expand Down

0 comments on commit cedeed7

Please sign in to comment.