minor logic change for checking if sort exists

This commit is contained in:
Shannon
2014-06-02 15:40:24 +10:00
parent f55f9edb71
commit e7994d077e

View File

@@ -84,8 +84,8 @@ namespace Umbraco.Core.Models
}
}
//check if the item's sort order is already in use
if (this.Select(x => x.SortOrder).Contains(item.SortOrder))
//check if the item's sort order is already in use
if (this.Any(x => x.SortOrder == item.SortOrder))
{
//make it the next iteration
item.SortOrder = this.Max(x => x.SortOrder) + 1;