From 36e7bb31e8fe7af06d19a4357bcd860fd13f3db2 Mon Sep 17 00:00:00 2001 From: erickson Date: Fri, 2 Feb 2007 15:07:40 +0000 Subject: [PATCH] added some logging to warn in multiple open circs for a copy git-svn-id: svn://svn.open-ils.org/ILS/trunk@6847 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm index 427d08ae5c..f4acc867f3 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm @@ -1274,9 +1274,13 @@ sub do_checkin { # the renew code will have already found our circulation object unless( $self->is_renewal and $self->circ ) { - $self->circ( - $self->editor->search_action_circulation( - { target_copy => $self->copy->id, checkin_time => undef })->[0]); + my $circs = $self->editor->search_action_circulation( + { target_copy => $self->copy->id, checkin_time => undef }); + $self->circ($$circs[0]); + + # for now, just warn if there are multiple open circs on a copy + $logger->warn("circulator: we have ".scalar(@$circs). + " open circs for copy " .$self->copy->id."!!") if @$circs > 1; } # if the circ is marked as 'claims returned', add the event to the list -- 2.11.0