From 544bcce349173f516891e20617c9c86a9218cb3a Mon Sep 17 00:00:00 2001
From: twistor <twistor@473738.no-reply.drupal.org>
Date: Wed, 25 Jan 2012 13:39:15 -0500
Subject: [PATCH] Issue #996808 by twistor, marcvangend, joshuajabbour: Fixed
 Update existing doesn't reset targets that have real_target() set.

---
 plugins/FeedsProcessor.inc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/plugins/FeedsProcessor.inc b/plugins/FeedsProcessor.inc
index 49404c2a..95dd9073 100644
--- a/plugins/FeedsProcessor.inc
+++ b/plugins/FeedsProcessor.inc
@@ -367,8 +367,8 @@ abstract class FeedsProcessor extends FeedsPlugin {
     // need to clear target elements of each item before mapping in case we are
     // mapping on a prepopulated item such as an existing node.
     foreach ($this->config['mappings'] as $mapping) {
-      if (isset($targets[$mapping['target']]['real_target'])) {
-        unset($target_item->{$targets[$mapping['target']]['real_target']});
+      if (isset($targets[$this->id][$mapping['target']]['real_target'])) {
+        unset($target_item->{$targets[$this->id][$mapping['target']]['real_target']});
       }
       elseif (isset($target_item->{$mapping['target']})) {
         unset($target_item->{$mapping['target']});
-- 
GitLab