From: Bernd Bleßmann Date: Mon, 20 Feb 2017 11:16:43 +0000 (+0100) Subject: CsvImport: temporäres Profil nicht beim Report speichern, … X-Git-Tag: release-3.5.4~1223 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=582df936f9cdd6eaf8e82d52d3ba9a52992693ef;p=kivitendo-erp.git CsvImport: temporäres Profil nicht beim Report speichern, … … denn das passiert schon beim Anlegen des Hintergrund-Jobs. --- diff --git a/SL/Controller/CsvImport.pm b/SL/Controller/CsvImport.pm index 13ec1f5be..005fcd703 100644 --- a/SL/Controller/CsvImport.pm +++ b/SL/Controller/CsvImport.pm @@ -502,12 +502,9 @@ sub save_report_single { $self->track_progress(phase => 'building report', progress => 0); - my $clone_profile = $self->profile->clone_and_reset_deep; - $clone_profile->save; # weird bug. if this isn't saved before adding it to the report, it will default back to the last profile. - my $report = SL::DB::CsvImportReport->new( session_id => $params{session_id}, - profile => $clone_profile, + profile_id => $self->profile->id, type => $self->type, file => '', numrows => scalar @{ $self->data }, @@ -573,12 +570,9 @@ sub save_report_multi { $self->track_progress(phase => 'building report', progress => 0); - my $clone_profile = $self->profile->clone_and_reset_deep; - $clone_profile->save; # weird bug. if this isn't saved before adding it to the report, it will default back to the last profile. - my $report = SL::DB::CsvImportReport->new( session_id => $params{session_id}, - profile => $clone_profile, + profile_id => $self->profile->id, type => $self->type, file => '', numrows => scalar @{ $self->data },