From 085aff657ac1a62c065aa0c9ed3dd1846ce244cb Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Thu, 16 Sep 2021 11:45:39 +0200 Subject: [PATCH] fix: preference par departement --- app/scodoc/sco_preferences.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/scodoc/sco_preferences.py b/app/scodoc/sco_preferences.py index ccdc6764d5..e5a274119a 100644 --- a/app/scodoc/sco_preferences.py +++ b/app/scodoc/sco_preferences.py @@ -181,7 +181,7 @@ def _convert_pref_type(p, pref_spec): def _get_pref_default_value_from_config(name, pref_spec): """get default value store in application level config. - If not found, use defalut value hardcoded in pref_spec. + If not found, use default value hardcoded in pref_spec. """ # XXX va changer avec la nouvelle base # search in scu.CONFIG @@ -1892,7 +1892,7 @@ class BasePreferences(object): def get(self, formsemestre_id, name): """Returns preference value. - If global_lookup, when no value defined for this semestre, returns global value. + when no value defined for this semestre, returns global value. """ params = { "dept_id": self.dept_id, @@ -1902,7 +1902,7 @@ class BasePreferences(object): cnx = ndb.GetDBConnexion() plist = self._editor.list(cnx, params) if not plist: - del params["formsemestre_id"] + params["formsemestre_id"] = None plist = self._editor.list(cnx, params) if not plist: return self.default[name]