Skip to content

Transmogrify handle empty OrgId affiliation (CFM-384) #182

Merged
merged 1 commit into from
May 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions app/src/Command/TransmogrifyCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -1328,8 +1328,10 @@ protected function split_external_identity(array $origRow, array $row) {
// lookup the CO ID in the cache, however by the time we've been called
// affiliation has been null'd out (since we're moving it to the role row).
// So shove it back in before calling map_affiliation_type.
$row['affiliation'] = $origRow['affiliation'];
$roleRow['affiliation_type_id'] = $this->map_affiliation_type($row);
if(!empty($origRow['affiliation'])) {
$row['affiliation'] = $origRow['affiliation'];
$roleRow['affiliation_type_id'] = $this->map_affiliation_type($row);
}

// Fix up changelog
// Since we're creating a new row, we have to manually fix up booleans
Expand Down