From 4e0628718e29585a992c4f68b87e890e881e07f4 Mon Sep 17 00:00:00 2001 From: Scott Koranda Date: Mon, 15 Apr 2024 08:48:20 -0500 Subject: [PATCH] Transmogrify fix group caching (CFM-385) --- app/src/Command/TransmogrifyCommand.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/Command/TransmogrifyCommand.php b/app/src/Command/TransmogrifyCommand.php index 48c119f7a..c0cc13df2 100644 --- a/app/src/Command/TransmogrifyCommand.php +++ b/app/src/Command/TransmogrifyCommand.php @@ -415,8 +415,10 @@ protected function cacheResults(string $table, array $row) { $this->cache[$table][$label][$key] = $row['id']; } else { - // Map id to the requested field - $this->cache[$table]['id'][ $row['id'] ][$field] = $row[$field]; + // If the row has the field then map id to the requested field. + if(array_key_exists($field, $row)) { + $this->cache[$table]['id'][ $row['id'] ][$field] = $row[$field]; + } } } }