Fixed tagging of new blog posts

--HG--
extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4043751
This commit is contained in:
skewed
2009-12-10 22:38:36 +00:00
parent a728a5ee92
commit e9296924cf

View File

@@ -114,15 +114,12 @@ namespace Orchard.Blogs.Controllers {
if (blog == null)
return new NotFoundResult();
BlogPost blogPost = _contentManager.New<BlogPost>("blogpost");
blogPost.Blog = blog;
BlogPost blogPost = _contentManager.Create<BlogPost>("blogpost", bp => { bp.Blog = blog; });
model.BlogPost = _contentManager.UpdateEditorModel(blogPost, null, this);
if (!ModelState.IsValid)
return View(model);
_contentManager.Create(model.BlogPost.Item.ContentItem);
//TEMP: (erikpo) ensure information has committed for this record
var session = _sessionLocator.For(typeof(BlogPostRecord));
session.Flush();