Certificate edit: update role and notification with owner change

This commit is contained in:
sayali
2020-10-09 16:55:19 -07:00
parent b59c76d630
commit d52e0d4e09
5 changed files with 62 additions and 11 deletions

View File

@@ -128,3 +128,11 @@ def render(args):
query = database.filter(query, Role, terms)
return database.sort_and_page(query, Role, args)
def get_or_create(role_name, description):
role = get_by_name(role_name)
if not role:
role = create(name=role_name, description=description)
return role