Skip to content

Commit c4ad598

Browse files
authored
Merge pull request #20 from micschk/patch-3
Reverse data key and object field fixes #19
2 parents 10339c4 + 4216efd commit c4ad598

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ExcelBulkLoader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,11 +432,11 @@ public function findExistingObject($record, $columnMap = [])
432432
$existingRecord = null;
433433
if (is_string($duplicateCheck)) {
434434
// Skip current duplicate check if field value is empty
435-
if (empty($record[$duplicateCheck])) {
435+
if (empty($record[$fieldName])) {
436436
continue;
437437
}
438438

439-
$dbFieldValue = $record[$duplicateCheck];
439+
$dbFieldValue = $record[$fieldName];
440440

441441
// Even if $record['ClassName'] is a subclass, this will work
442442
$existingRecord = DataObject::get($this->objectClass)

0 commit comments

Comments
 (0)