Create blog_authors only when needed
This commit is contained in:
parent
702aa11ecf
commit
ebb0b45299
@ -706,8 +706,7 @@ impl FromId<DbConn> for Post {
|
|||||||
cover_id: cover,
|
cover_id: cover,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
})?;
|
.and_then(|post| {
|
||||||
|
|
||||||
for author in authors {
|
for author in authors {
|
||||||
PostAuthor::insert(
|
PostAuthor::insert(
|
||||||
conn,
|
conn,
|
||||||
@ -718,6 +717,10 @@ impl FromId<DbConn> for Post {
|
|||||||
)?;
|
)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Ok(post)
|
||||||
|
})
|
||||||
|
})?;
|
||||||
|
|
||||||
// save mentions and tags
|
// save mentions and tags
|
||||||
let mut hashtags = md_to_html(&post.source, None, false, None)
|
let mut hashtags = md_to_html(&post.source, None, false, None)
|
||||||
.2
|
.2
|
||||||
|
Loading…
Reference in New Issue
Block a user