mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Fixed tagging of new blog posts
--HG-- extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4043751
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user