Fixing and error causing duplicate roles to be created. (#339)

* Fixing and error causing duplicate roles to be created.

* Fixing python3

* Fixing python2 and python3
This commit is contained in:
kevgliss
2016-05-31 15:44:54 -07:00
parent be5dff8472
commit b2539b843b
5 changed files with 11 additions and 6 deletions

View File

@ -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)