Fixes bug where authority status was not set correctly. (#739)
This commit is contained in:
parent
dd39b9ebe8
commit
f91ae5b319
|
@ -70,7 +70,7 @@ class AuthorityInputSchema(LemurInputSchema):
|
||||||
class AuthorityUpdateSchema(LemurInputSchema):
|
class AuthorityUpdateSchema(LemurInputSchema):
|
||||||
owner = fields.Email(required=True)
|
owner = fields.Email(required=True)
|
||||||
description = fields.String()
|
description = fields.String()
|
||||||
active = fields.Boolean()
|
active = fields.Boolean(missing=True)
|
||||||
roles = fields.Nested(AssociatedRoleSchema(many=True))
|
roles = fields.Nested(AssociatedRoleSchema(many=True))
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -29,9 +29,7 @@ def update(authority_id, description=None, owner=None, active=None, roles=None):
|
||||||
if roles:
|
if roles:
|
||||||
authority.roles = roles
|
authority.roles = roles
|
||||||
|
|
||||||
if active:
|
authority.active = active
|
||||||
authority.active = active
|
|
||||||
|
|
||||||
authority.description = description
|
authority.description = description
|
||||||
authority.owner = owner
|
authority.owner = owner
|
||||||
return database.update(authority)
|
return database.update(authority)
|
||||||
|
|
Loading…
Reference in New Issue