Refactor breadcrumbs to respect permissions, refs #1831

This commit is contained in:
Simon Willison 2022-10-13 14:42:52 -07:00
commit 1a5e5f2aa9
13 changed files with 65 additions and 59 deletions

View file

@ -845,7 +845,7 @@ def test_hook_menu_links(app_client):
def get_menu_links(html):
soup = Soup(html, "html.parser")
return [
{"label": a.text, "href": a["href"]} for a in soup.find("nav").select("a")
{"label": a.text, "href": a["href"]} for a in soup.select(".nav-menu a")
]
response = app_client.get("/")