mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Merge pull request #6124 from dcinzona/patch-3
Removing duplicate fields from content parts fails
This commit is contained in:
@@ -43,7 +43,7 @@ namespace Orchard.ContentManagement.MetaData.Builders {
|
||||
}
|
||||
|
||||
public ContentPartDefinitionBuilder RemoveField(string fieldName) {
|
||||
var existingField = _fields.SingleOrDefault(x => x.Name == fieldName);
|
||||
var existingField = _fields.FirstOrDefault(x => x.Name == fieldName);
|
||||
if (existingField != null) {
|
||||
_fields.Remove(existingField);
|
||||
}
|
||||
@@ -162,4 +162,4 @@ namespace Orchard.ContentManagement.MetaData.Builders {
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user