mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-18 17:47:54 +08:00
Fixing import when two identifiers collide
--HG-- branch : 1.x
This commit is contained in:
@@ -44,12 +44,17 @@ namespace Orchard.ContentManagement {
|
||||
_lastIndex++;
|
||||
|
||||
// ignore content item if it has already been imported
|
||||
if(_contentItemIds.ContainsKey(item.Id)) {
|
||||
if (_contentItemIds.ContainsKey(item.Id)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
var identity = _contentManager.GetItemMetadata(item).Identity;
|
||||
|
||||
// ignore content item if the same identity is already present
|
||||
if (_identities.ContainsKey(identity)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
_identities.Add(identity, item);
|
||||
_contentItemIds.Add(item.Id, identity);
|
||||
|
||||
|
Reference in New Issue
Block a user