added code to force reshelving of a copy if it's on-holds-shelf and there
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 14 Sep 2006 19:41:49 +0000 (19:41 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 14 Sep 2006 19:41:49 +0000 (19:41 +0000)
is no unfulfilled, captured hold for the copy

git-svn-id: svn://svn.open-ils.org/ILS/trunk@6107 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm

index 1455656..a57450a 100644 (file)
@@ -1396,7 +1396,11 @@ sub checkin_check_holds_shelf {
                }
        );
 
-       return 0 unless @$holds;
+       unless(@$holds) {
+               $logger->warn("circulator: copy is on-holds-shelf, but there is no hold - reshelving");
+               $self->reshelve_copy(1);
+               return 0;
+       }
 
        my $hold = $$holds[0];