From 086cb8f8f50e94d5375ca6d10eb1d87a42e5651b Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Wed, 18 Aug 2021 23:01:23 +0200 Subject: [PATCH] Fix: silently ignore unused pref names --- app/scodoc/sco_preferences.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/scodoc/sco_preferences.py b/app/scodoc/sco_preferences.py index 0559a53a..5e518846 100644 --- a/app/scodoc/sco_preferences.py +++ b/app/scodoc/sco_preferences.py @@ -1808,7 +1808,9 @@ class BasePreferences(object): for p in preflist: if not p["formsemestre_id"] in self.prefs: self.prefs[p["formsemestre_id"]] = {} - + # Ignore les noms de préférences non utilisés dans le code: + if p["name"] not in self.prefs_dict: + continue # Convert types: if ( p["name"] in self.prefs_dict