mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
#18618: Fixing exception when a Tags filter contains a non existent tag
Work Item: 18618 --HG-- branch : 1.x
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
Reference in New Issue
Block a user