Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mgax committed Dec 19, 2023
1 parent 3fc1d6b commit ba7fa32
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ietf/utils/migrations/0009_megamenu.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ def populate_main_menu(apps, schema_editor):
MainMenuItem = apps.get_model("utils.MainMenuItem")

def live_children(page):
if not page:
return Page.objects.none()
# path of children is path of parent with 4 more characters at the end
return Page.objects.filter(path__regex=f"^{page.path}....$").filter(live=True).order_by("path")

Expand Down

0 comments on commit ba7fa32

Please sign in to comment.