Skip to content

Commit

Permalink
Merge pull request #64 from multnomah-county-it/dev
Browse files Browse the repository at this point in the history
Added missing case statement for dates
  • Loading branch information
john-c-houser authored Jul 28, 2023
2 parents 60396f5 + dbf8654 commit 993a081
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ingestor.pl
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,7 @@ sub create_data_structure {
'cityState' => 'CITY/STATE',
'zipCode' => 'ZIP',
'email' => 'EMAIL',
'birthDate' => 'birthDate'
);

# Determine the mode
Expand All @@ -655,6 +656,7 @@ sub create_data_structure {
}

foreach my $field (sort keys %{$client->{'fields'}}) {

my $value = defined($student->{$field}) ? $student->{$field} : '';

# Set default values
Expand Down Expand Up @@ -690,6 +692,11 @@ sub create_data_structure {
$new_student{'fields'}{$field} = $student->{$field};
}
}
case 'date' {
if ( $mode eq 'new' || ($client->{'fields'}->{$field}->{'overlay'} eq 'true' && $student->{$field}) ) {
$new_student{'fields'}{$field} = $student->{$field};
}
}
case 'resource' {
if ( $mode eq 'new' || ($client->{'fields'}->{$field}->{'overlay'} eq 'true' && $student->{$field}) ) {
$new_student{'fields'}{$field}{'resource'} = "/policy/$resource{$field}";
Expand Down

0 comments on commit 993a081

Please sign in to comment.