Removing the ability to use spaces in custom names. (#455)

This commit is contained in:
kevgliss 2016-10-15 04:56:25 -07:00 committed by GitHub
parent c367e4f73f
commit f921b67fff
1 changed files with 1 additions and 0 deletions

View File

@ -27,6 +27,7 @@ from lemur.domains.models import Domain
def get_or_increase_name(name):
name = '-'.join(name.strip().split(' '))
count = Certificate.query.filter(Certificate.name.ilike('{0}%'.format(name))).count()
if count >= 1: