From: Moritz Bunkus Date: Tue, 14 Apr 2015 08:34:20 +0000 (+0200) Subject: SL::DB::BackgroundJob::data_as_hash auch als Writer benutzen können X-Git-Tag: release-3.3.0beta~151^2 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=e4e46bf6a2e8b8d11106b264d0f181a37763a472;p=kivitendo-erp.git SL::DB::BackgroundJob::data_as_hash auch als Writer benutzen können --- diff --git a/SL/DB/BackgroundJob.pm b/SL/DB/BackgroundJob.pm index 2040297b1..3e6c03da5 100644 --- a/SL/DB/BackgroundJob.pm +++ b/SL/DB/BackgroundJob.pm @@ -75,6 +75,9 @@ sub run { sub data_as_hash { my $self = shift; + + $self->data(YAML::Dump($_[0])) if @_; + return {} if !$self->data; return $self->data if ref($self->{data}) eq 'HASH'; return YAML::Load($self->{data}) if !ref($self->{data});