Bug 20644: (follow-up) Fix swagger description + put "inherit" by default

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Shi Yao Wang 2025-08-21 17:38:32 -04:00 committed by Lucas Gass
parent 1468ce33b8
commit b18db898ef
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
2 changed files with 3 additions and 6 deletions

View File

@ -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;

View File

@ -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: