From d03460a5ccc7e1e6b11bd2723a91192291539eac Mon Sep 17 00:00:00 2001 From: Tidiane Dia Date: Fri, 7 Jan 2022 12:06:05 +0000 Subject: [PATCH] rename parent_page_id API parameter to destination_page_id for consistency with other actions --- wagtail/admin/api/actions/create_alias.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wagtail/admin/api/actions/create_alias.py b/wagtail/admin/api/actions/create_alias.py index 02014ba74d..daebe4d46c 100644 --- a/wagtail/admin/api/actions/create_alias.py +++ b/wagtail/admin/api/actions/create_alias.py @@ -13,7 +13,7 @@ from .base import APIAction class CreatePageAliasAPIActionSerializer(Serializer): - parent_page_id = fields.IntegerField(required=False) + destination_page_id = fields.IntegerField(required=False) recursive = fields.BooleanField(default=False, required=False) update_slug = fields.CharField(required=False) update_locale = fields.CharField(required=False) @@ -24,9 +24,9 @@ class CreatePageAliasAPIAction(APIAction): serializer = CreatePageAliasAPIActionSerializer def _action_from_data(self, instance, data): - parent, parent_page_id = None, data.get("parent_page_id") - if parent_page_id: - parent = get_object_or_404(Page, id=parent_page_id).specific + parent, destination_page_id = None, data.get("destination_page_id") + if destination_page_id: + parent = get_object_or_404(Page, id=destination_page_id).specific return CreatePageAliasAction( page=instance,