Added properly working imports with minions and status

This commit is contained in:
Finn 2019-07-08 18:12:35 +01:00
parent 22e6001362
commit d0506c2a95
No known key found for this signature in database
GPG key ID: 7455B4B17685B598
7 changed files with 49 additions and 59 deletions

View file

@ -15,7 +15,9 @@ sub import_csv {
my $rows = $self->csv_data;
return $rows;
foreach my $row ( @{$rows} ) {
$self->_row_to_result($row);
}
}
sub _row_to_result {

View file

@ -19,11 +19,10 @@ sub import_csv {
my ($self) = @_;
my $rows = $self->csv_data;
my $lcc_org = $self->schema->resultset('Organisation')->find({ name => "Lancashire County Council" });
foreach my $row ( @{$rows} ) {
$self->_row_to_result($row, $lcc_org);
$self->_row_to_result($row);
}
return 1;
}
sub _row_to_result {

View file

@ -29,7 +29,7 @@ has _csv_filehandle => (
my $self = shift;
my $fh;
if ( $self->has_csv_file ) {
open $fh, '<', \${$self->csv_file};
open $fh, '<', $self->csv_file;
} elsif ( $self->has_csv_string ) {
my $string = $self->csv_string;
open $fh, '<', \$string;