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

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