Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into network-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgleason committed Jan 31, 2019
2 parents e8317e1 + 14790c9 commit 0bb844d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion project_tier/home/templatetags/homepage_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
def get_site_root(context):
# NB this returns a wagtailcore.Page, not the implementation-specific model used
# so object-comparison to self will return false as objects would differ
return context['request'].site.root_page
page = context.get('calling_page') or context.get('page')
return page.get_site().root_page

def has_menu_children(page):
return page.get_children().live().in_menu().exists()
Expand Down
3 changes: 2 additions & 1 deletion project_tier/home/templatetags/navigation_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
def get_site_root(context):
# NB this returns a wagtailcore.Page, not the implementation-specific model used
# so object-comparison to self will return false as objects would differ
return context['request'].site.root_page
page = context.get('calling_page') or context.get('page')
return page.get_site().root_page


def has_menu_children(page):
Expand Down

0 comments on commit 0bb844d

Please sign in to comment.