From: erickson Date: Fri, 18 Jan 2008 15:19:18 +0000 (+0000) Subject: changed entry create to just take the object X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=cbbba7b59c8199144764834c202f7b6e2de7748a;p=Evergreen.git changed entry create to just take the object git-svn-id: svn://svn.open-ils.org/ILS/branches/acq-experiment@8417 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm b/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm index 8bcb3a9fc7..63e7e2230a 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm @@ -157,28 +157,22 @@ __PACKAGE__->register_method( desc => 'Creates a picklist entry', params => [ {desc => 'Authentication token', type => 'string'}, - {desc => 'ID of Picklist to attach to', type => 'number'}, - {desc => 'MARC XML of picklist data', type => 'string'}, - {desc => 'Bib ID of exising biblio.record_entry if appropriate', type => 'string'} + {desc => 'The picklist_entry object to create', type => 'object'}, ], return => {desc => 'ID of newly created picklist_entry on success, Event on error'} } ); sub create_picklist_entry { - my($self, $conn, $auth, $picklist_id, $marc_xml, $bibid) = @_; + my($self, $conn, $auth, $entry) = @_; my $e = new_editor(xact=>1, authtoken=>$auth); return $e->die_event unless $e->checkauth; return $e->die_event unless $e->allowed('CREATE_PICKLIST'); - my $picklist = $e->retrieve_acq_picklist($picklist_id) + my $picklist = $e->retrieve_acq_picklist($entry->picklist) or return $e->die_event; return $BAD_PARAMS unless $picklist->owner == $e->requestor->id; - my $entry = Fieldmapper::acq::picklist_entry->new; - $entry->picklist($picklist_id); - $entry->marc($marc_xml); - $entry->eg_bib_id($bibid); $e->create_acq_picklist_entry($entry) or return $e->die_event; $e->commit;