diff --git a/lemur/authorities/schemas.py b/lemur/authorities/schemas.py index 7002c4a0..cc045504 100644 --- a/lemur/authorities/schemas.py +++ b/lemur/authorities/schemas.py @@ -57,7 +57,7 @@ class AuthorityInputSchema(LemurInputSchema): @validates_schema def validate_subca(self, data): if data['type'] == 'subca': - if not data.get('authority'): + if not data.get('parent'): raise ValidationError("If generating a subca parent 'authority' must be specified.") diff --git a/lemur/certificates/models.py b/lemur/certificates/models.py index b4f7d8a8..bf123424 100644 --- a/lemur/certificates/models.py +++ b/lemur/certificates/models.py @@ -82,7 +82,7 @@ class Certificate(db.Model): self.destinations = kwargs.get('destinations', []) self.notifications = kwargs.get('notifications', []) self.description = kwargs.get('description') - self.roles = kwargs.get('roles', []) + self.roles = list(set(kwargs.get('roles', []))) self.replaces = kwargs.get('replacements', []) self.signing_algorithm = defaults.signing_algorithm(cert) self.bits = defaults.bitstrength(cert) diff --git a/lemur/static/app/angular/authorities/authority/tracking.tpl.html b/lemur/static/app/angular/authorities/authority/tracking.tpl.html index 5b72d775..3544bf1c 100644 --- a/lemur/static/app/angular/authorities/authority/tracking.tpl.html +++ b/lemur/static/app/angular/authorities/authority/tracking.tpl.html @@ -85,10 +85,10 @@