diff --git a/admin/itemtypes.pl b/admin/itemtypes.pl index cfccde48da..e52bd11ee5 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 354aa68db7..44801329a9 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: