Fix ability to remove all roles from authority (#880)

This commit is contained in:
Marti Raudsepp
2017-08-29 03:35:01 +03:00
committed by kevgliss
parent aca6d6346f
commit bb1c339655
3 changed files with 34 additions and 4 deletions

View File

@ -16,7 +16,7 @@ from lemur.roles import service as role_service
from lemur.certificates.service import upload
def update(authority_id, description=None, owner=None, active=None, roles=None):
def update(authority_id, description, owner, active, roles):
"""
Update an authority with new values.
@ -26,12 +26,11 @@ def update(authority_id, description=None, owner=None, active=None, roles=None):
"""
authority = get(authority_id)
if roles:
authority.roles = roles
authority.roles = roles
authority.active = active
authority.description = description
authority.owner = owner
return database.update(authority)