From 582df936f9cdd6eaf8e82d52d3ba9a52992693ef Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Mon, 20 Feb 2017 12:16:43 +0100 Subject: [PATCH] =?utf8?q?CsvImport:=20tempor=C3=A4res=20Profil=20nicht=20?= =?utf8?q?beim=20Report=20speichern,=20=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit … denn das passiert schon beim Anlegen des Hintergrund-Jobs. --- SL/Controller/CsvImport.pm | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) 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 }, -- 2.20.1