From 47891d2953c8eb061be2d0f8df4dd9a1ca6402ec Mon Sep 17 00:00:00 2001 From: kevgliss Date: Fri, 1 Apr 2016 09:58:19 -0700 Subject: [PATCH] Closes #261 --- lemur/authorities/service.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lemur/authorities/service.py b/lemur/authorities/service.py index 9a7ff6a2..1d3d2779 100644 --- a/lemur/authorities/service.py +++ b/lemur/authorities/service.py @@ -103,6 +103,10 @@ def create(kwargs): # the owning dl or role should have this authority associated with it owner_role = role_service.get_by_name(kwargs['ownerEmail']) + + if not owner_role: + owner_role = role_service.create(kwargs['ownerEmail']) + owner_role.authority = authority g.current_user.authorities.append(authority)