From 3e4570c9d6bd03e012488eb6003f441470c85a25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20W=C3=B6rister?= <31357619+fwoerister@users.noreply.github.com> Date: Sun, 9 Nov 2025 14:46:43 +0100 Subject: [PATCH] `next_grading_allowed_at` included into current exercise endpoint response --- app/api/v1/exercise.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/api/v1/exercise.py b/app/api/v1/exercise.py index 6dab2b7..6ed11e9 100644 --- a/app/api/v1/exercise.py +++ b/app/api/v1/exercise.py @@ -101,6 +101,11 @@ async def get_current_exercise(tan_code: str, session: AsyncSession = Depends(ge logging.info(progress.start_time.tzinfo) + next_grading = progress.next_grading_allowed_at + + if not next_grading: + next_grading = now + return ExerciseWithUnlockTimestamps(**exercise.to_dict(), skip_unlock_time=( progress.start_time + timedelta(minutes=exercise.skip_delay)),