SL::DB::BackgroundJob::data_as_hash auch als Writer benutzen können
[kivitendo-erp.git] / SL / DB / BackgroundJob.pm
index 2040297..3e6c03d 100644 (file)
@@ -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});