diff --git a/entityreference.module b/entityreference.module index 6e40277..a59cffa 100644 --- a/entityreference.module +++ b/entityreference.module @@ -263,10 +263,9 @@ function entityreference_field_presave($entity_type, $entity, $field, $instance, // If the revisions are locked, make sure they do not change. if (!empty($field['settings']['handler_settings']['lock_revision'])) { - // Get the revision ID from the original item. If that is not set get it - // from the current item. - $revision_id = !empty($item['revision_id']) ? $item['revision_id'] : NULL; + // Get the revision ID from the original item unless set in current item. $revision_id = !empty($original_revision_ids[$item['target_id']]) ? $original_revision_ids[$item['target_id']] : $revision_id; + $revision_id = !empty($item['revision_id']) ? $item['revision_id'] : NULL; } // Use the current revision if the revisions are not locked, or no // previous revision was set.