Improve if statement

master
Dimitri Huisman 3 years ago
parent 69ce21c353
commit 7d801c560c

@ -18,7 +18,7 @@ def domain_list():
def domain_create(): def domain_create():
form = forms.DomainForm() form = forms.DomainForm()
if form.validate_on_submit(): if form.validate_on_submit():
if validators.domain(form.name.data) is True: if validators.domain(form.name.data):
conflicting_domain = models.Domain.query.get(form.name.data) conflicting_domain = models.Domain.query.get(form.name.data)
conflicting_alternative = models.Alternative.query.get(form.name.data) conflicting_alternative = models.Alternative.query.get(form.name.data)
conflicting_relay = models.Relay.query.get(form.name.data) conflicting_relay = models.Relay.query.get(form.name.data)

Loading…
Cancel
Save