From f7ac7d96beb69f8ff2de0ce2d62f993e214a4f5b Mon Sep 17 00:00:00 2001 From: Marco Capetta Date: Wed, 2 Sep 2026 15:46:53 +0200 Subject: [PATCH] MT#65890 Fix regression on PATCH calls to CallForwardsItem api Add missing "add" and "remove" operations for /api/callforwardsitem PATCH When the endpoint was refactored in commit 205b27a26 to use the EntitiesItem, this block was dropped - my $json = $self->get_valid_patch_data( - c => $c, - id => $id, - media_type => 'application/json-patch+json', - ops => [qw/add replace remove copy/], - ); And by default EntitiesItem allows only "replace, copy" operations. They missing operations are added back using set_config({ PATCH => { ops => [qw/add replace remove copy/] }, }) Change-Id: Id9c131d679511efa1eeef040373ae7b53a4f93f8 --- lib/NGCP/Panel/Controller/API/CallForwardsItem.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/NGCP/Panel/Controller/API/CallForwardsItem.pm b/lib/NGCP/Panel/Controller/API/CallForwardsItem.pm index 852584a00d..0589614598 100644 --- a/lib/NGCP/Panel/Controller/API/CallForwardsItem.pm +++ b/lib/NGCP/Panel/Controller/API/CallForwardsItem.pm @@ -41,7 +41,8 @@ __PACKAGE__->set_config({ allowed_roles => { Default => [qw/admin reseller ccareadmin ccare subscriberadmin subscriber/], Journal => [qw/admin reseller subscriberadmin subscriber/], - } + }, + PATCH => { ops => [qw/add replace remove copy/] }, }); sub delete_item {