From 2362ee8ab206dffde6f77c7dfaebb8b5f8002f7f Mon Sep 17 00:00:00 2001
From: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Date: Wed, 23 Apr 2025 11:13:50 +0100
Subject: [PATCH] Bug 38010: (QA follow-up) Handle form parameters in the
browser
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
---
Koha/REST/V1/Acquisitions/Vendors.pm | 6 ------
.../prog/js/vue/components/Vendors/VendorFormAdd.vue | 3 +++
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/Koha/REST/V1/Acquisitions/Vendors.pm b/Koha/REST/V1/Acquisitions/Vendors.pm
index 33157edfd95..1ae2bde2c97 100644
--- a/Koha/REST/V1/Acquisitions/Vendors.pm
+++ b/Koha/REST/V1/Acquisitions/Vendors.pm
@@ -89,9 +89,6 @@ sub add {
my $contacts = delete $vendor->{contacts};
my $interfaces = delete $vendor->{interfaces};
my $aliases = delete $vendor->{aliases};
- delete $vendor->{subscriptions};
- delete $vendor->{baskets};
- delete $vendor->{contracts};
my $vendor_to_store = Koha::Acquisition::Bookseller->new_from_api( $c->req->json );
@@ -132,9 +129,6 @@ sub update {
my $contacts = delete $vendor_update->{contacts};
my $interfaces = delete $vendor_update->{interfaces};
my $aliases = delete $vendor_update->{aliases};
- my $subscriptions = delete $vendor_update->{subscriptions};
- my $baskets = delete $vendor_update->{baskets};
- my $contracts = delete $vendor_update->{contracts};
$vendor->set_from_api($vendor_update);
$vendor->store();
diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorFormAdd.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorFormAdd.vue
index 6ea4c6c007f..d0fe88f87fe 100644
--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorFormAdd.vue
+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorFormAdd.vue
@@ -127,6 +127,9 @@ export default {
}
delete vendor.physical;
delete vendor.subscriptions_count;
+ delete vendor.baskets;
+ delete vendor.subscriptions;
+ delete vendor.contracts;
if (!this.discountValid)
errors.push(this.$__("Invalid discount value"));
--
2.34.1