From 48270076a7b73368e6d4d3bf6312a12e29ffc3cb Mon Sep 17 00:00:00 2001 From: erickson Date: Tue, 13 May 2008 20:00:13 +0000 Subject: [PATCH] lineitem creation does not necessarily require a picklist git-svn-id: svn://svn.open-ils.org/ILS/branches/acq-experiment@9585 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../src/perlmods/OpenILS/Application/Acq/Picklist.pm | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm b/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm index b40f4ba3d6..3949937ad4 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm @@ -296,14 +296,16 @@ sub create_lineitem { 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; - - # indicate the picklist was updated - $picklist->edit_time('now'); - $e->update_acq_picklist($picklist) or return $e->die_event; + 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; + } $li->selector($e->requestor->id); $e->create_acq_lineitem($li) or return $e->die_event; -- 2.11.0