Fixes bug where authority status was not set correctly. (#739)

This commit is contained in:
kevgliss 2017-03-29 10:10:51 -07:00 committed by GitHub
parent dd39b9ebe8
commit f91ae5b319
2 changed files with 2 additions and 4 deletions

View File

@ -70,7 +70,7 @@ class AuthorityInputSchema(LemurInputSchema):
class AuthorityUpdateSchema(LemurInputSchema):
owner = fields.Email(required=True)
description = fields.String()
active = fields.Boolean()
active = fields.Boolean(missing=True)
roles = fields.Nested(AssociatedRoleSchema(many=True))

View File

@ -29,9 +29,7 @@ def update(authority_id, description=None, owner=None, active=None, roles=None):
if roles:
authority.roles = roles
if active:
authority.active = active
authority.active = active
authority.description = description
authority.owner = owner
return database.update(authority)