Skip to content

Commit

Permalink
Fix depth to parent selector
Browse files Browse the repository at this point in the history
  • Loading branch information
robmoorman authored and mvantellingen committed May 31, 2017
1 parent fc44217 commit decfc88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wagtail_personalisation/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def copy_page_view(request, page_id, segment_id):
}

try:
variant = Page.objects.get(slug=slug, depth=page.depth)
variant = Page.objects.get(slug=slug, parent=page.parent)
except Page.DoesNotExist:
variant = page.copy(update_attrs=update_attrs, copy_revisions=False)

Expand Down

0 comments on commit decfc88

Please sign in to comment.