Removing the ability to use spaces in custom names. (#455)
This commit is contained in:
parent
c367e4f73f
commit
f921b67fff
|
@ -27,6 +27,7 @@ from lemur.domains.models import Domain
|
||||||
|
|
||||||
|
|
||||||
def get_or_increase_name(name):
|
def get_or_increase_name(name):
|
||||||
|
name = '-'.join(name.strip().split(' '))
|
||||||
count = Certificate.query.filter(Certificate.name.ilike('{0}%'.format(name))).count()
|
count = Certificate.query.filter(Certificate.name.ilike('{0}%'.format(name))).count()
|
||||||
|
|
||||||
if count >= 1:
|
if count >= 1:
|
||||||
|
|
Loading…
Reference in New Issue