From 8bfa0c372816c4daceaf38321c1c195dcc59341f Mon Sep 17 00:00:00 2001 From: Sebastien Ros Date: Fri, 22 Jun 2012 13:27:39 -0700 Subject: [PATCH] #18618: Fixing exception when a Tags filter contains a non existent tag Work Item: 18618 --HG-- branch : 1.x --- src/Orchard.Web/Modules/Orchard.Tags/Projections/TagsFilter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Orchard.Web/Modules/Orchard.Tags/Projections/TagsFilter.cs b/src/Orchard.Web/Modules/Orchard.Tags/Projections/TagsFilter.cs index d2a7ea6ac..0dcbbca40 100644 --- a/src/Orchard.Web/Modules/Orchard.Tags/Projections/TagsFilter.cs +++ b/src/Orchard.Web/Modules/Orchard.Tags/Projections/TagsFilter.cs @@ -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)); }