#18618: Fixing exception when a Tags filter contains a non existent tag

Work Item: 18618

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2012-06-22 13:27:39 -07:00
parent 94c9f39740
commit 8bfa0c3728

View File

@@ -46,7 +46,7 @@ namespace Orchard.Tags.Projections {
return T("Any tag");
}
var tagNames = tags.Split(new[] { ',' }).Select(x => _tagService.GetTag(Int32.Parse(x)).TagName);
var tagNames = tags.Split(new[] { ',' }).Select(x => _tagService.GetTag(Int32.Parse(x))).Where(x => x != null).Select(x => x.TagName);
return T("Tagged with {0}", String.Join(", ", tagNames));
}