[open-ils-commits] r9585 -
branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue May 13 16:00:16 EDT 2008
Author: erickson
Date: 2008-05-13 16:00:13 -0400 (Tue, 13 May 2008)
New Revision: 9585
Modified:
branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm
Log:
lineitem creation does not necessarily require a picklist
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-05-13 19:50:02 UTC (rev 9584)
+++ branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm 2008-05-13 20:00:13 UTC (rev 9585)
@@ -296,15 +296,17 @@
return $e->die_event unless $e->checkauth;
return $e->die_event unless $e->allowed('CREATE_PICKLIST');
- my $picklist = $e->retrieve_acq_picklist($li->picklist)
- or return $e->die_event;
- return OpenILS::Event->new('BAD_PARAMS')
- unless $picklist->owner == $e->requestor->id;
+ if($li->picklist) {
+ my $picklist = $e->retrieve_acq_picklist($li->picklist)
+ or return $e->die_event;
+ return OpenILS::Event->new('BAD_PARAMS')
+ unless $picklist->owner == $e->requestor->id;
+
+ # indicate the picklist was updated
+ $picklist->edit_time('now');
+ $e->update_acq_picklist($picklist) or return $e->die_event;
+ }
- # indicate the picklist was updated
- $picklist->edit_time('now');
- $e->update_acq_picklist($picklist) or return $e->die_event;
-
$li->selector($e->requestor->id);
$e->create_acq_lineitem($li) or return $e->die_event;
More information about the open-ils-commits
mailing list