returning correct event on checkin when there is no copy to checkin
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 28 Jul 2006 20:12:33 +0000 (20:12 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 28 Jul 2006 20:12:33 +0000 (20:12 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5161 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index 4690e6f..fd14a2f 100644 (file)
@@ -1071,6 +1071,10 @@ sub do_checkin {
        my $self = shift;
        $self->log_me("do_checkin()");
 
+       return $self->bail_on_events(
+               OpenILS::Event->new('ASSET_COPY_NOT_FOUND')) 
+               unless $self->copy;
+
        unless( $self->is_renewal ) {
                return $self->bail_on_events($self->editor->event)
                        unless $self->editor->allowed('COPY_CHECKIN');