Bug 22417: Fix borrowernumber values

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: David Cook <dcook@prosentient.com.au>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2020-02-19 11:14:53 +01:00
parent dc20949f65
commit 9eb971ca6b

View file

@ -31,6 +31,7 @@ sub enqueue {
my $job_size = $params->{job_size};
my $job_args = $params->{job_args};
my $borrowernumber = C4::Context->userenv->{number}; # FIXME Handle non GUI calls
my $json_args = encode_json $job_args;
$self->set({
status => 'new',
@ -38,7 +39,7 @@ sub enqueue {
size => $job_size,
data => $json_args,
enqueued_on => dt_from_string,
borrowernumber => C4::Context->userenv->{id}, # FIXME Handle non GUI calls
borrowernumber => $borrowernumber,
})->store;
my $job_id = $self->id;