Fix a logic error in NCIP::ILS::Evergreen->acceptitem.
authorJason Stephenson <jason@sigio.com>
Mon, 8 Sep 2014 01:14:32 +0000 (21:14 -0400)
committerJason Stephenson <jason@sigio.com>
Mon, 8 Sep 2014 01:14:32 +0000 (21:14 -0400)
This is embarrassing: I had =~, when I really wanted !~, when
checking the value of RequestedActionType.

Signed-off-by: Jason Stephenson <jason@sigio.com>
lib/NCIP/ILS/Evergreen.pm

index aebe23d..558890a 100644 (file)
@@ -346,7 +346,7 @@ sub acceptitem {
     $response->header($self->make_header($request));
 
     # We only accept holds for the time being.
-    if ($request->{$message}->{RequestedActionType} =~ /^hold\w/i) {
+    if ($request->{$message}->{RequestedActionType} !~ /^hold\w/i) {
         # We need the item id or we can't do anything at all.
         my ($item_barcode, $item_idfield) = $self->find_item_barcode($request);
         if (ref($item_barcode) eq 'NCIP::Problem') {