From bb30aab206e218946fa3fe5104850a1d79553ac6 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 12 Apr 2023 16:59:29 +0200 Subject: [PATCH] Bug 33483: Prevent 400 when more than 1 agreement is linked We were passing package_agreements.agreement and the server returned Object { message: "Properties not allowed: agreement.", path: "/body/package_agreements/0" } Signed-off-by: Pedro Amorim Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi --- .../js/vue/components/ERM/EHoldingsEBSCOPackageAgreements.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsEBSCOPackageAgreements.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsEBSCOPackageAgreements.vue index d7ecaf80c2..4716cf7bff 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsEBSCOPackageAgreements.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsEBSCOPackageAgreements.vue @@ -62,6 +62,9 @@ export default { delete erm_package.vendor delete erm_package.resources_count delete erm_package.is_selected + erm_package.package_agreements = erm_package.package_agreements.map( + ({ package_id, agreement, ...keepAttrs }) => keepAttrs + ) return erm_package }, addAgreement(agreement_id) { -- 2.39.5