Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion awx/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ def get_urlpatterns(prefix=None):
re_path(r'^login/', handle_login_redirect),
# want api/v2/doesnotexist to return a 404, not match the ui urls,
# so use a negative lookahead assertion here
re_path(r'^(?!api/).*', include('awx.ui.urls', namespace='ui')),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment now separated from the code it describes

Low Severity

The comment on lines 37–38 ("so use a negative lookahead assertion here") originally sat directly above the re_path(r'^(?!api/).*', ...) pattern. After the move, the comment remains at the end of one urlpatterns block while the pattern it describes is now in a separate urlpatterns += block ~12 lines later. The word "here" no longer refers to anything nearby, making the comment misleading. The comment would be more useful if it traveled with the pattern it explains.

Additional Locations (1)
Fix in Cursor Fix in Web

]

if settings.DYNACONF.is_development_mode:
Expand All @@ -47,6 +46,10 @@ def get_urlpatterns(prefix=None):
except ImportError:
pass

urlpatterns += [
re_path(r'^(?!api/).*', include('awx.ui.urls', namespace='ui')),
]

return urlpatterns


Expand Down
Loading