TT#107051 enable "add" for PATCH /billingprofiles/x

(cherry picked from commit 92455d8566)
(cherry picked from commit b46ad2f1fec97416527673efa04066681a7d2014)

Change-Id: I4a284fb0ea636402c19e98369dbb9c2a05ea1d94
mr6.5.12
Rene Krenn 5 years ago
parent 87b09f5f2e
commit 2bc33470b0

@ -78,6 +78,7 @@ sub PATCH :Allow {
c => $c,
id => $id,
media_type => 'application/json-patch+json',
ops => ["add", "replace", "copy", "remove"],
);
last unless $json;
@ -85,8 +86,7 @@ sub PATCH :Allow {
my $profile = $self->profile_by_id($c, $id);
last unless $self->resource_exists($c, billingprofile => $profile);
my $old_resource = $self->resource_from_item($c, $profile, $form);
$old_resource = clone($old_resource);
my $resource = $self->apply_patch($c, $old_resource, $json);
my $resource = $self->apply_patch($c, clone($old_resource), $json);
last unless $resource;
$profile = $self->update_profile($c, $profile, $old_resource, $resource, $form);

Loading…
Cancel
Save