Bug 20592: Return early in ModItem if nothing to update
Two lines of code and move them earlier. Add a check to make sure there are changes. Followed the test plan, both the _BEFORE_ and after do as described. Signed-off-by: Cori Lynn Arnold <carnold@dgiinc.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> (cherry picked from commit1f0064bbdd) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> (cherry picked from commit75d6195c0e) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
4adc6ca70e
commit
1671f009e6
|
|
@ -546,6 +546,9 @@ sub ModItem {
|
|||
my $biblionumber = shift;
|
||||
my $itemnumber = shift;
|
||||
|
||||
return unless %$item;
|
||||
$item->{'itemnumber'} = $itemnumber or return;
|
||||
|
||||
# if $biblionumber is undefined, get it from the current item
|
||||
unless (defined $biblionumber) {
|
||||
$biblionumber = _get_single_item_column('biblionumber', $itemnumber);
|
||||
|
|
@ -560,8 +563,6 @@ sub ModItem {
|
|||
$item->{'more_subfields_xml'} = _get_unlinked_subfields_xml($unlinked_item_subfields);
|
||||
};
|
||||
|
||||
$item->{'itemnumber'} = $itemnumber or return;
|
||||
|
||||
my @fields = qw( itemlost withdrawn );
|
||||
|
||||
# Only call GetItem if we need to set an "on" date field
|
||||
|
|
|
|||
Loading…
Reference in New Issue