Working service integration.

This commit is contained in:
Nicholas Staples
2016-01-18 17:35:28 +00:00
parent 6e19dd7c9c
commit 609f5f0a8d
11 changed files with 147 additions and 110 deletions

View File

@@ -169,8 +169,8 @@ class AddServiceForm(Form):
name = StringField('Service Name', validators=[
DataRequired(message='Service name can not be empty')])
def validate_service_name(self, a):
if self.service_name.data in self._names_func():
def validate_name(self, a):
if a.data in self._names_func():
raise ValidationError('Service name already exists')