From 74b8b90a651f0c354dd26c53915c688e55ced45b Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Mon, 22 Jan 2024 15:50:01 +0100 Subject: [PATCH] Fix: retreive_formsemestre_from_request / sans semestre --- app/scodoc/html_sidebar.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/scodoc/html_sidebar.py b/app/scodoc/html_sidebar.py index c0c732ce..b64cefc6 100755 --- a/app/scodoc/html_sidebar.py +++ b/app/scodoc/html_sidebar.py @@ -88,8 +88,10 @@ def retreive_formsemestre_from_request() -> int: if formsemestre_id is None: return None # no current formsemestre - - return int(formsemestre_id) + try: + return int(formsemestre_id) + except ValueError: + return None # no current formsemestre def sidebar_common():