Fix: silently ignore unused pref names

This commit is contained in:
Emmanuel Viennet 2021-08-18 23:01:23 +02:00
parent 4b485d5a4c
commit 086cb8f8f5

View File

@ -1808,7 +1808,9 @@ class BasePreferences(object):
for p in preflist: for p in preflist:
if not p["formsemestre_id"] in self.prefs: if not p["formsemestre_id"] in self.prefs:
self.prefs[p["formsemestre_id"]] = {} 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: # Convert types:
if ( if (
p["name"] in self.prefs_dict p["name"] in self.prefs_dict