User attribut may not exist

This commit is contained in:
Valentin Samir 2015-06-07 17:12:04 +02:00
parent aa5bb7ef72
commit fe8c74ba08

View file

@ -186,7 +186,7 @@ class ServicePattern(models.Model):
raise BadFilter('%s do not match %s %s' % ( raise BadFilter('%s do not match %s %s' % (
filtre.pattern, filtre.pattern,
filtre.attribut, filtre.attribut,
user.attributs[filtre.attribut] user.attributs.get(filtre.attribut)
)) ))
if self.user_field and not user.attributs.get(self.user_field): if self.user_field and not user.attributs.get(self.user_field):
raise UserFieldNotDefined() raise UserFieldNotDefined()