# HG changeset patch # User Sylvain Thénault # Date 1352371224 -3600 # Node ID bc74608d20031e360566333ec15b4bec12eeab00 # Parent 3f60f416dddbbda467e100fbf0c621642ce50560 [ldaputils] should use entity.eid instead of entity on raising ValidationError. closes #2517095 diff -r 3f60f416dddb -r bc74608d2003 server/ldaputils.py --- a/server/ldaputils.py Wed Nov 14 11:06:24 2012 +0100 +++ b/server/ldaputils.py Thu Nov 08 11:40:24 2012 +0100 @@ -137,13 +137,13 @@ def _entity_update(self, source_entity): if self.urls: if len(self.urls) > 1: - raise ValidationError(source_entity, {'url': _('can only have one url')}) + raise ValidationError(source_entity.eid, {'url': _('can only have one url')}) try: protocol, hostport = self.urls[0].split('://') except ValueError: - raise ValidationError(source_entity, {'url': _('badly formatted url')}) + raise ValidationError(source_entity.eid, {'url': _('badly formatted url')}) if protocol not in PROTO_PORT: - raise ValidationError(source_entity, {'url': _('unsupported protocol')}) + raise ValidationError(source_entity.eid, {'url': _('unsupported protocol')}) def update_config(self, source_entity, typedconfig): """update configuration from source entity. `typedconfig` is config