Fix bug 744
[osm/NBI.git] / osm_nbi / admin_topics.py
index 968788a..71fb83b 100644 (file)
@@ -768,7 +768,7 @@ class RoleTopicAuth(BaseTopic):
                     raise ValidationError("Operation authorization \".\" should be True/False.")
             if role_def[-1] == ":":
                 raise ValidationError("Operation cannot end with \".\"")
-            
+
             role_def_matches = [op for op in operations if op.startswith(role_def)]
 
             if len(role_def_matches) == 0:
@@ -847,7 +847,7 @@ class RoleTopicAuth(BaseTopic):
         """
         roles = self.auth.get_role_list()
         system_admin_role = [role for role in roles
-                             if roles["name"] == "system_admin"][0]
+                             if role["name"] == "system_admin"][0]
 
         if _id == system_admin_role["_id"]:
             raise EngineException("You cannot delete system_admin role", http_code=HTTPStatus.FORBIDDEN)