X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/7515976d9cc927f6f72a191442c5788856f610fd..8efb262f2f1a58b3ce30d16d376bc64a56a24119:/validators.py?ds=sidebyside diff --git a/validators.py b/validators.py index 1e73c0b..0c6fa78 100644 --- a/validators.py +++ b/validators.py @@ -44,8 +44,8 @@ class TreeParentValidator(object): def get_message(self): return self.static_message or _(u"A %s can't be its own parent." % self.instance.__class__.__name__) message = property(get_message) - - + + class TreePositionValidator(object): code = 'invalid' @@ -54,7 +54,7 @@ class TreePositionValidator(object): self.slug = slug self.obj_class = obj_class self.static_message = message - + if code is not None: self.code = code @@ -71,7 +71,7 @@ class TreePositionValidator(object): if obj.id != value.id: raise ValidationError(self.message) - + except self.obj_class.DoesNotExist: pass