From ceab33df80fa550c0bd1ab3e38cde3bebcc58c15 Mon Sep 17 00:00:00 2001 From: Aaron Tan Date: Fri, 2 Jun 2017 12:25:37 -0400 Subject: [PATCH] Prevent generating named URL from non-existing endpoints. --- awx/main/middleware.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/main/middleware.py b/awx/main/middleware.py index 15e8dc58eb..900c800d59 100644 --- a/awx/main/middleware.py +++ b/awx/main/middleware.py @@ -111,7 +111,7 @@ def _customize_graph(): class URLModificationMiddleware(object): def __init__(self): - models = apps.get_app_config('main').get_models() + models = [m for m in apps.get_app_config('main').get_models() if hasattr(m, 'get_absolute_url')] generate_graph(models) _customize_graph() register(