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)
|
if (blog == null)
|
||||||
return new NotFoundResult();
|
return new NotFoundResult();
|
||||||
|
|
||||||
BlogPost blogPost = _contentManager.New<BlogPost>("blogpost");
|
BlogPost blogPost = _contentManager.Create<BlogPost>("blogpost", bp => { bp.Blog = blog; });
|
||||||
blogPost.Blog = blog;
|
|
||||||
model.BlogPost = _contentManager.UpdateEditorModel(blogPost, null, this);
|
model.BlogPost = _contentManager.UpdateEditorModel(blogPost, null, this);
|
||||||
|
|
||||||
if (!ModelState.IsValid)
|
if (!ModelState.IsValid)
|
||||||
return View(model);
|
return View(model);
|
||||||
|
|
||||||
_contentManager.Create(model.BlogPost.Item.ContentItem);
|
|
||||||
|
|
||||||
//TEMP: (erikpo) ensure information has committed for this record
|
//TEMP: (erikpo) ensure information has committed for this record
|
||||||
var session = _sessionLocator.For(typeof(BlogPostRecord));
|
var session = _sessionLocator.For(typeof(BlogPostRecord));
|
||||||
session.Flush();
|
session.Flush();
|
||||||
|
Reference in New Issue
Block a user