[open-ils-commits] r9894 -
branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Jun 20 12:10:41 EDT 2008
Author: erickson
Date: 2008-06-20 12:10:39 -0400 (Fri, 20 Jun 2008)
New Revision: 9894
Modified:
branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm
Log:
exiting early if picklist delete fails. setting picklist org_unit
Modified: branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm
===================================================================
--- branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm 2008-06-19 21:12:47 UTC (rev 9893)
+++ branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm 2008-06-20 16:10:39 UTC (rev 9894)
@@ -29,6 +29,7 @@
my($self, $conn, $auth, $picklist) = @_;
my $e = new_editor(xact=>1, authtoken=>$auth);
return $e->die_event unless $e->checkauth;
+ $picklist->org_unit($e->requestor->ws_ou) unless $picklist->org_unit;
return $e->die_event unless $e->allowed('CREATE_PICKLIST', $picklist->org_unit);
return OpenILS::Event->new('BAD_PARAMS')
unless $e->requestor->id == $picklist->owner;
@@ -413,7 +414,8 @@
$name ||= '';
my $picklist = $e->search_acq_picklist({owner=>$e->requestor->id, name=>$name})->[0];
if($name eq '' and $picklist) {
- delete_picklist($self, $conn, $auth, $picklist->id);
+ my $evt = delete_picklist($self, $conn, $auth, $picklist->id);
+ return $evt unless $evt == 1;
$picklist = undef;
}
@@ -421,6 +423,7 @@
$picklist = Fieldmapper::acq::picklist->new;
$picklist->owner($e->requestor->id);
$picklist->name($name);
+ $picklist->org_unit($e->requestor->ws_ou);
$e->create_acq_picklist($picklist) or return $e->die_event;
}
@@ -430,8 +433,8 @@
while(my $resp = $req->recv(timeout=>60)) {
my $result = $resp->content;
- use Data::Dumper;
- $logger->info("results = ".Dumper($resp));
+ #use Data::Dumper;
+ #$logger->info("results = ".Dumper($resp));
my $count = $result->{count};
my $total = (($count < $search->{limit}) ? $count : $search->{limit})+1;
my $ctr = 0;
More information about the open-ils-commits
mailing list