From: phasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Date: Thu, 1 Apr 2010 05:15:07 +0000 (+0000)
Subject: results are fancier in perl; adjust the result test from open-ils.cat
X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c1c1b97b1f1a995c7d8ca6bc22ed19aa3fc4b1cb;p=evergreen%2Fmasslnc.git

results are fancier in perl; adjust the result test from open-ils.cat

From my open-ils.acq.lineitem.cancel branch


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

diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm b/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm
index f755fbbb75..0fcd56243f 100644
--- a/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm
+++ b/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm
@@ -2461,7 +2461,7 @@ sub cancel_lineitem {
     my $cat_req = $cat_service->request('open-ils.cat.asset.copy.fleshed.batch.update', $mgr->editor->authtoken, $copies);
     my $cat_result  = $cat_req->recv;
     $cat_service->disconnect;
-    if ($cat_result != 1) { # failed to delete copies
+    if (!$cat_result or $cat_result->content != 1) { # failed to delete copies
         return new OpenILS::Event(
             "ACQ_NOT_CANCELABLE", "note" => "lineitem $li_id", "payload" => $cat_result
         );