mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 02:42:26 -05:00
Move and rename macro.html
Remove print statements Fix code style
This commit is contained in:
@@ -89,11 +89,7 @@ class AddServiceForm(Form):
|
||||
service_name = StringField(validators=[DataRequired(message='Please enter your service name')])
|
||||
|
||||
def validate_service_name(self, a):
|
||||
print("a {}".format(a))
|
||||
print("self.service_name {}".format(self.service_name.data))
|
||||
print("service_names {}".format(self.service_names))
|
||||
if self.service_name.data in self.service_names:
|
||||
print('here')
|
||||
raise ValidationError('Service name already exists')
|
||||
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ from app.main.forms import AddServiceForm
|
||||
@login_required
|
||||
def add_service():
|
||||
form = AddServiceForm(services_dao.find_all_service_names())
|
||||
print("serivce_names {}".format(services_dao.find_all_service_names()))
|
||||
if form.validate_on_submit():
|
||||
|
||||
user = users_dao.get_user_by_id(session['user_id'])
|
||||
@@ -17,4 +16,3 @@ def add_service():
|
||||
return redirect('/dashboard')
|
||||
else:
|
||||
return render_template('views/add-service.html', form=form)
|
||||
§
|
||||
Reference in New Issue
Block a user