Bugfix fatal error: $self->editor is not defined
authoratz <atz@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 11 Jun 2010 17:10:33 +0000 (17:10 +0000)
committeratz <atz@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 11 Jun 2010 17:10:33 +0000 (17:10 +0000)
Logger wasn't being used either.

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

Open-ILS/src/perlmods/OpenILS/Application/Trigger/Validator/Acq/PurchaseOrderEDIRequired.pm

index 028134f..28c9ffc 100644 (file)
@@ -1,22 +1,23 @@
 package OpenILS::Application::Trigger::Validator::Acq::PurchaseOrderEDIRequired;
 use strict; use warnings;
-use OpenSRF::Utils::Logger qw/:logger/;
+# use OpenSRF::Utils::Logger qw/:logger/;
+use OpenILS::Utils::CStoreEditor qw/ new_editor /;
 use OpenILS::Application::AppUtils;
 my $U = 'OpenILS::Application::AppUtils';
 
 sub handler {
     my $self = shift;
-    my $env = shift;
-    my $po = $env->{target};
+    my $env  = shift;
+    my $po   = $env->{target};
 
     my $provider = 
         ref($po->provider) ? 
             $po->provider : 
-            $self->editor->retrieve_acq_provider($po->provider);
+            new_editor->retrieve_acq_provider($po->provider);
 
     return 1 if 
         $po->state eq 'on-order' and 
-        $provider->edi_default and 
+        $provider->edi_default   and 
         $U->is_true($provider->active);
 
     return 0;