Skip to content

Commit

Permalink
Merge pull request #1076 from koskila/fix/1075
Browse files Browse the repository at this point in the history
Improves handling taxonomy custom sort order by checking for empty values
  • Loading branch information
gautamdsheth authored Oct 29, 2024
2 parents bf66ea8 + b2c1547 commit f20191a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,8 @@ from m in termGroup.GroupManagerPrincipalNames
{
var sortOrder = customSortOrder.Split(new[] { ':' }).ToList();

var currentTermIndex = sortOrder.Where(i => new Guid(i) == term.Id).FirstOrDefault();
var currentTermIndex = sortOrder.Where(i => !String.IsNullOrEmpty(i) && new Guid(i) == term.Id).FirstOrDefault();
modelTerm.CustomSortOrder = sortOrder.IndexOf(currentTermIndex) + 1;

}
}
termsToReturn = termsToReturn.OrderBy(t => t.CustomSortOrder).ToList();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ public static void MapProperties(Object source, Object destination, Dictionary<S
catch (Exception)
{
// Right now, for testing purposes, I just output and skip any issue
// TODO: Handle issues insteaf of skipping them, we need to find a common pattern
// TODO: Handle issues instead of skipping them, we need to find a common pattern
}
}
}
Expand Down

0 comments on commit f20191a

Please sign in to comment.