From 87f5c5339c651bdd81d76be00ba28188030db2de Mon Sep 17 00:00:00 2001 From: sunchen <59046031@qq.com> Date: Wed, 7 Nov 2018 17:03:03 +0800 Subject: [PATCH] Default Changelist --- .../module/article/controller/_ArticleController.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/module-article/module-article-web/src/main/java/io/jpress/module/article/controller/_ArticleController.java b/module-article/module-article-web/src/main/java/io/jpress/module/article/controller/_ArticleController.java index 6ea0215a0..8782cff33 100644 --- a/module-article/module-article-web/src/main/java/io/jpress/module/article/controller/_ArticleController.java +++ b/module-article/module-article-web/src/main/java/io/jpress/module/article/controller/_ArticleController.java @@ -178,10 +178,13 @@ public class _ArticleController extends AdminControllerBase { articleService.doUpdateCategorys(id, allIds); - for (Long categoryId : allIds) { - categoryService.updateCount(categoryId); + if (allIds != null ) { + for (Long categoryId : allIds) { + categoryService.updateCount(categoryId); + } } + Ret ret = id > 0 ? Ret.ok().set("id", id) : Ret.fail(); renderJson(ret); } -- Gitee