summaryrefslogtreecommitdiffstats
path: root/awxkit/awxkit/api/pages/roles.py
diff options
context:
space:
mode:
Diffstat (limited to 'awxkit/awxkit/api/pages/roles.py')
-rw-r--r--awxkit/awxkit/api/pages/roles.py12
1 files changed, 3 insertions, 9 deletions
diff --git a/awxkit/awxkit/api/pages/roles.py b/awxkit/awxkit/api/pages/roles.py
index 2b317dece1..07f0790b60 100644
--- a/awxkit/awxkit/api/pages/roles.py
+++ b/awxkit/awxkit/api/pages/roles.py
@@ -18,15 +18,11 @@ class Role(base.Base):
cache = page.PageCache()
natural_key = super(Role, self).get_natural_key(cache=cache)
- related_objs = [
- related for name, related in self.related.items()
- if name not in ('users', 'teams')
- ]
+ related_objs = [related for name, related in self.related.items() if name not in ('users', 'teams')]
if related_objs:
related_endpoint = cache.get_page(related_objs[0])
if related_endpoint is None:
- log.error("Unable to obtain content_object %s for role %s",
- related_objs[0], self.endpoint)
+ log.error("Unable to obtain content_object %s for role %s", related_objs[0], self.endpoint)
return None
natural_key['content_object'] = related_endpoint.get_natural_key(cache=cache)
@@ -41,6 +37,4 @@ class Roles(page.PageList, Role):
pass
-page.register_page([resources.roles,
- resources.related_roles,
- resources.related_object_roles], Roles)
+page.register_page([resources.roles, resources.related_roles, resources.related_object_roles], Roles)