Bug 38751: Update Standard ILL backend add_request
Make use of newly updated ILL::Request->extended_attributes method instead of creating the query manually Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
2a6bc075f6
commit
6526e00374
|
|
@ -991,19 +991,13 @@ sub add_request {
|
|||
if column_exists( 'illrequests', 'batch_id' );
|
||||
$request->store;
|
||||
|
||||
while ( my ( $type, $value ) = each %{$request_details} ) {
|
||||
if ( $value && length $value > 0 ) {
|
||||
Koha::ILL::Request::Attribute->new(
|
||||
{
|
||||
illrequest_id => $request->illrequest_id,
|
||||
column_exists( 'illrequestattributes', 'backend' ) ? ( backend => "Standard" ) : (),
|
||||
type => $type,
|
||||
value => $value,
|
||||
readonly => 0
|
||||
}
|
||||
)->store;
|
||||
my @request_details_array = map {
|
||||
{
|
||||
'type' => $_,
|
||||
'value' => $request_details->{$_},
|
||||
}
|
||||
}
|
||||
} keys %{$request_details};
|
||||
$request->extended_attributes( \@request_details_array );
|
||||
|
||||
return $request;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue