1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-02 09:51:09 +03:00

Prevent generating named URL from non-existing endpoints.

This commit is contained in:
Aaron Tan 2017-06-02 12:25:37 -04:00
parent 2cb296d28b
commit ceab33df80

View File

@ -111,7 +111,7 @@ def _customize_graph():
class URLModificationMiddleware(object): class URLModificationMiddleware(object):
def __init__(self): 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) generate_graph(models)
_customize_graph() _customize_graph()
register( register(