From f921b67fff4486ca7498195c42217a05102c8fde Mon Sep 17 00:00:00 2001 From: kevgliss Date: Sat, 15 Oct 2016 04:56:25 -0700 Subject: [PATCH] Removing the ability to use spaces in custom names. (#455) --- lemur/certificates/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lemur/certificates/models.py b/lemur/certificates/models.py index 956e5a4f..b8429643 100644 --- a/lemur/certificates/models.py +++ b/lemur/certificates/models.py @@ -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: