Bug 7677: QA followup

Fix 'unique contraint primary' error when receiving serials

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Julian Maurice 2016-08-25 16:08:45 +02:00 committed by Kyle M Hall
parent 7e55d09c42
commit 381dd46c36
2 changed files with 2 additions and 2 deletions

View File

@ -39,7 +39,7 @@ Koha::Serial::Item - Koha Serial Item Object class
=cut
sub type {
sub _type {
return 'Serialitem';
}

View File

@ -257,7 +257,7 @@ if ( $op and $op eq 'serialchangestatus' ) {
my $previous = GetPreviousSerialid($subscriptionids[$i]);
if ($previous) {
my $serialitem = Koha::Serial::Items->find( $previous );
my $serialitem = Koha::Serial::Items->search( {serialid => $previous} )->next;
my $itemnumber = $serialitem ? $serialitem->itemnumber : undef;
if ($itemnumber) {