From 66f0c7da7eacd44b325c398aa55dcedeb6e1c09f Mon Sep 17 00:00:00 2001 From: Shi Yao Wang Date: Thu, 21 Aug 2025 17:38:32 -0400 Subject: [PATCH] Bug 20644: (follow-up) Fix swagger description + put "inherit" by default --- admin/itemtypes.pl | 7 ++----- api/v1/swagger/definitions/item_type.yaml | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/admin/itemtypes.pl b/admin/itemtypes.pl index cfccde48da9..e52bd11ee53 100755 --- a/admin/itemtypes.pl +++ b/admin/itemtypes.pl @@ -99,7 +99,7 @@ if ( $op eq 'add_form' ) { my $rentalcharge_hourly_calendar = $input->param('rentalcharge_hourly_calendar') // 0; my $automatic_checkin = $input->param('automatic_checkin') // 0; my $bookable = $input->param('bookable') // 0; - my $checkprevcheckout = $input->param('checkprevcheckout'); + my $checkprevcheckout = $input->param('checkprevcheckout') // 'inherit'; if ( $itemtype and $is_a_modif ) { # it's a modification $itemtype->description($description); @@ -121,10 +121,7 @@ if ( $op eq 'add_form' ) { $itemtype->rentalcharge_hourly_calendar($rentalcharge_hourly_calendar); $itemtype->automatic_checkin($automatic_checkin); $itemtype->bookable($bookable); - - if ( defined $checkprevcheckout ) { - $itemtype->checkprevcheckout($checkprevcheckout); - } + $itemtype->checkprevcheckout($checkprevcheckout); eval { $itemtype->store; diff --git a/api/v1/swagger/definitions/item_type.yaml b/api/v1/swagger/definitions/item_type.yaml index 354aa68db7c..44801329a99 100644 --- a/api/v1/swagger/definitions/item_type.yaml +++ b/api/v1/swagger/definitions/item_type.yaml @@ -99,7 +99,7 @@ properties: - yes - no - inherit - description: Produce a warning for this item type if this item has previously been checked out to this patron if ''yes'', not if ''no'', defer to syspref setting if ''inherit''.' + description: Produce a warning for this item type if this item has previously been checked out to this patron if ''yes'', not if ''no'', defer to patron setting if ''inherit'' additionalProperties: false required: -- 2.43.0