FIX: Use delete_all_posts_max to improve consistency when using the delete button from the admin view (#9194)

This commit is contained in:
Roman Rizzi
2020-03-16 09:51:28 -03:00
committed by GitHub
parent ce50695bff
commit c02273eb8b
2 changed files with 4 additions and 2 deletions

View File

@ -199,7 +199,8 @@ export default Controller.extend(CanCheckEmails, {
destroy() {
const postCount = this.get("model.post_count");
if (postCount <= 5) {
const maxPostCount = this.siteSettings.delete_all_posts_max;
if (postCount <= maxPostCount) {
return this.model.destroy({ deletePosts: true });
} else {
return this.model.destroy();