Bug 15757: Make issuelength default to null instead of 0
When editing circ rules, if the Loan period "issuelength" is not defined (empty string), the default value was 0, not it's inserted in the DB as NULL. Test plan: 1/ Create or edit a circ rule 2/ Do not fill the Loan period column 3/ Save => Without this patch, the value was 0 => With this patch it's now an empty string (in the DB it's set to NULL) Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Works as described. No errors Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
d83aff33c6
commit
d46a664ef6
|
|
@ -140,6 +140,7 @@ elsif ($op eq 'add') {
|
|||
$maxonsiteissueqty =~ s/\s//g;
|
||||
$maxonsiteissueqty = undef if $maxonsiteissueqty !~ /^\d+/;
|
||||
my $issuelength = $input->param('issuelength');
|
||||
$issuelength = $issuelength eq q{} ? undef : $issuelength;
|
||||
my $lengthunit = $input->param('lengthunit');
|
||||
my $hardduedate = $input->param('hardduedate') || undef;
|
||||
$hardduedate = eval { dt_from_string( $input->param('hardduedate') ) } if ( $hardduedate );
|
||||
|
|
|
|||
Loading…
Reference in New Issue