Merge pull request #6520 from infofromca/fieldduplicated

[Fixes #6497] 1.10 Field names duplicated in dropdown list,
This commit is contained in:
Sébastien Ros 2016-03-08 09:39:28 -08:00
commit 2b12a43385

View File

@ -272,8 +272,8 @@ namespace Orchard.ContentTypes.Services {
_contentDefinitionEventHandlers.ContentPartRemoved(new ContentPartRemovedContext {ContentPartDefinition = partDefinition});
}
public IEnumerable<ContentFieldInfo> GetFields() {
return _contentFieldDrivers.SelectMany(d => d.GetFieldInfo());
public IEnumerable<ContentFieldInfo> GetFields() {
return _contentFieldDrivers.SelectMany(d => d.GetFieldInfo()).GroupBy(x => x.FieldTypeName).Select(g => g.First());
}
public void AddFieldToPart(string fieldName, string fieldTypeName, string partName) {