From fd821d6ff2376c88ef287236862caa64931e7f00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Tue, 12 Sep 2023 16:48:55 +0000 Subject: [PATCH] _security indexing --- api/advent22_api/routers/_security.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/advent22_api/routers/_security.py b/api/advent22_api/routers/_security.py index 29f406a..1e548fe 100644 --- a/api/advent22_api/routers/_security.py +++ b/api/advent22_api/routers/_security.py @@ -57,7 +57,7 @@ async def user_can_view_day( True iff das Türchen von Tag `day` user-sichtbar ist """ - if day < 0: + if day < 1: raise HTTPException(status.HTTP_422_UNPROCESSABLE_ENTITY) - return day < await user_visible_doors() + return day <= await user_visible_doors()