From fe8c74ba08ec5f7d0d8da9c97ad9b03ef580d185 Mon Sep 17 00:00:00 2001 From: Valentin Samir Date: Sun, 7 Jun 2015 17:12:04 +0200 Subject: [PATCH] User attribut may not exist --- cas_server/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cas_server/models.py b/cas_server/models.py index 3c0635f..2b9631b 100644 --- a/cas_server/models.py +++ b/cas_server/models.py @@ -186,7 +186,7 @@ class ServicePattern(models.Model): raise BadFilter('%s do not match %s %s' % ( filtre.pattern, filtre.attribut, - user.attributs[filtre.attribut] + user.attributs.get(filtre.attribut) )) if self.user_field and not user.attributs.get(self.user_field): raise UserFieldNotDefined()