feat: better pxe error message

This commit is contained in:
nikolark committed 2016-12-07 22:26:54 +01:00
1 parent 093fae0fea
commit 51b595a11d
1 file changed
+3 -1
+3 -1
View File
@@ -34,7 +34,9 @@ class HostPXEValidateSerializer(serializers.Serializer):
raise ValidationError('Host \'{}\' has no pxe_key.'.format(attrs['certname']))
if host.pxe_key != attrs['pxe_key']:
raise ValidationError('Supplied pxe_key does not match host \'{}\'.'.format(attrs['certname']))
raise ValidationError('Supplied pxe_key \'{}\' does not match host \'{}\'.'.format(
attrs['pxe_key'],
attrs['certname']))
self.host = host