Skip to content

Commit

Permalink
allow a destination adapter to override the ID attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
briskt committed Sep 6, 2024
1 parent 35c74c3 commit 15c7f22
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ func GenerateChangeSet(logger *log.Logger, sourcePeople, destinationPeople []Per

if !personAttributesAreEqual(logger, sp, destinationPerson, config) {
sp.ID = destinationPerson.Attributes["id"]
if destinationPerson.ID != "" { // use ID if it is set to something else
sp.ID = destinationPerson.ID
}
changeSet.Update = append(changeSet.Update, sp)
continue
}
Expand Down

0 comments on commit 15c7f22

Please sign in to comment.